home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 3 / Gold Medal Software - Volume 3 (Gold Medal) (1994).iso / wordproc / hshell1.arj / HSREF.HYP / hsref.hxp
Text File  |  1993-12-29  |  200KB  |  5,790 lines

  1. .INDEX
  2. .HEADER
  3. ~M ~TwF~TKile ~PMFile~Kf~E ~M ~TwC~TKontents ~PMContents~Kc~E ~M ~TwG~TKoto ~PMGoto~Kg~E ~M ~TwS~TKearch ~PMSearch~Ks~E ~M ~TwO~TKther ~PMOther~Ko~E ~M ~TwH~TKelp ~PMHelp~Kh~E ~c
  4. ║~A    ~PF-~K-~E║~A    ~PB~E║~A   ~Pb@B~E║~A    ~PF+~K+~E║~A   ~PA@C3$$1~E║
  5. ┌──────────────────────────────────────────────────────────────────────────────┐
  6. │~DF $1 - $2 ~h/~C72√ Match~Z~C79 ~DT│
  7. └──────────────────────────────────────────────────────────────────────────────┘~i5
  8. .REMARK 
  9. Reference hyperfile for HyperShell
  10. Copyright (c) 1990,1991,1992 N.G.Taylor
  11. Version 4 amendment level 9
  12. .
  13. .PRINT MARGIN 5
  14. .
  15. .PRINT TITLE
  16. HyperShell Reference Guide
  17. .
  18. .CHECK +fa
  19. Check both menu types
  20.  
  21. .
  22. .MENU File
  23. Type file  |T?File name
  24. List HSREF |O91;THSREF.HYP;O90
  25. ──── » ────|ZUc
  26. Command    |D?Command line
  27. DOS shell  |D
  28. ──── « ────|ZUh
  29. About     a|NHyperShell
  30. Quit  F10 q|Q
  31. .
  32. .MENU Search
  33. Title search   |A@S?Search string
  34. Search Text  F6|A@X?Search string
  35. Pick and search|SPicksrch
  36. ─────── » ─────|ZUo
  37. Add to search  |O*64;MSearch
  38. Refine search  |O*63;MSearch
  39. ─────── « ─────|ZUg
  40. Matched flag ± |ZL/
  41. ───────────────|
  42. Next matching  |F+1
  43. List matching l|A@C1
  44. Unmatched list |A@C2
  45. .
  46. .MENU Contents
  47. Contents list F2|A@C
  48. ─────── » ──────|ZUg
  49. From current    |A@C3$1
  50. Starting with   |A@C0?Starting with
  51. ────── « ───────|ZUf
  52. List sections   |A@C4Section
  53. By category     |MCategories
  54. .
  55. .MENU Categories
  56. Action codes    |A@C4Action
  57. Conditions      |A@C4Condition
  58. Function codes  |A@C4Function
  59. Modifier codes  |A@C4Modifier
  60. Reference flags |A@C4Flag
  61. Dynamic menus   |A@C4Menuspec
  62. Bitmap commands |A@C4Sublanguage
  63. Graphic system  |A@C4^\[G\]
  64. .
  65. .MENU Goto
  66. Next frame        n|F+
  67. Matching frame    m|F+1
  68. Previous frame    p|F-
  69. Home frame         |b1
  70.  ─────── » ─────── |ZUs
  71. Backtrack one     b|B
  72. Unwind backtrack F4|b@B
  73. Revisit frame      |A@b
  74.  ─────── « ─────── |ZUc
  75. Select noted ref F5|A@R
  76. .
  77. .MENU Other
  78. Action    F8|A?What action
  79. Calculator  |SCalculator
  80. ───── » ────|ZUh
  81. Example     |FExample script
  82. Print frame |Dhp -p -o hsref $1
  83. ───── « ────|ZUs
  84. Set colours |MColours;y#
  85. Last error  |Sperror
  86. .
  87. .MENU Help
  88. Selecting    |NSelecting
  89. Key mappings |NKey mappings
  90. Funct. keys  |NFkeys
  91. Menu bar     |NMenu bar
  92. ────── » ────|ZUf
  93. Information i|NInfo
  94. Notation     |NNotation
  95. Colour key   |NKey
  96. ────── « ────|ZUo
  97. Paged lists  |MPaged Help
  98.  
  99. .
  100. .MENU Paged Help
  101. Control Keys |NPaged control keys
  102. Paged lists  |NPaged lists
  103. Selecting    |NSelecting
  104. .
  105. .CHECK -fax
  106. .
  107. .MENU Error text
  108. 1 - Operation cancelled
  109. 2 - No selection from menu
  110. 3 - End of file
  111. 4 - Cant open file
  112. 5 - File not open
  113. 6 - File open
  114. 7 - File changed
  115. 8 - At start of backtrack
  116. 9 - Divide by 0
  117. 10 - Value not expected
  118. 11 - Value expected
  119. 12 - Undefined opcode
  120. 13 - Unmatched parenthesis
  121. 14 - Syntax error
  122. 15 - Script not available
  123. 16 - Menu not available
  124. 17 - Note not available
  125. 18 - Frame not available
  126. 19 - Key not defined
  127. 20 - Invalid key code
  128. 21 - Local ref can't be noted
  129. 22 - Not at reference
  130. 23 - Key not mapped
  131. 24 - No action or disabled
  132. 25 - Invalid action code
  133. 26 - No command
  134. 27 - Env var not present
  135. 28 - Invalid dynamic menu
  136. 29 - Line too wide for screen
  137. 30 - String too long
  138. 31 - Too many lines in frame
  139. 32 - Max script reached
  140. 33 - Maximum menu size reached
  141. .
  142. .NOTE HyperShell
  143.   -------------- HyperShell Version 5 --------------
  144.       Copyright (c) Text Technology 1988-1993
  145. Design, Implementation and Documentation by Nick Taylor
  146. .
  147. .NOTE Paged lists
  148.  Type contents of file
  149.  Search titles or texts
  150.  Detailed directory list
  151.  Contents list
  152.  Backtrack list
  153.  Noted references list
  154. .
  155. .NOTE Paged control keys
  156.  F1 or ?    - This help
  157.  F2 or #    - Page number (*T)
  158.  F3 or PgUp - Previous page
  159.  F4 or Home - Start of list/file
  160.  F5         - Find next (*T)
  161.  F6 or /    - Search file (*T)
  162.  F8 or End  - End of file (*T)
  163.  F9         - Quit (*T Suspend list)
  164.  F10        - Quit (*T Quit list)
  165.  Return     - Select (*T Suspend)
  166.  (*T - Type file control keys)
  167. .
  168. .NOTE Info
  169.    - $9 -
  170.  Frame: $1
  171.  Title: $2
  172.  File : $3
  173.  Date : $4
  174.  Time : $5
  175.  ~ABacktrack ~O2 ~PO2A;NInfo~E with $6 entries
  176.  ~AAutoref ~O4 ~PO4A;NInfo~E
  177.  Error status $? ~C32~AClear~PYah;NInfo~E
  178. .
  179. .NOTE Menu bar
  180.  The menus on the menu bar can be
  181.  selected using their initial
  182.  letters. With a menu on display,
  183.  the options can be selected with
  184.  the initial letter of the option.
  185. .
  186. .NOTE Key mappings
  187.  The following key mappings
  188.  are always provided:-
  189.  
  190.   q     Quit HyperShell
  191.   n     Next frame
  192.   p     Previous frame
  193.   b     Backtrack one step
  194.   m     Next matching frame
  195. .
  196. .NOTE Key
  197.  A ~Mmenu~PNKey~E gives a menu.
  198.  A ~Nnote~PNKey~E displays a note.
  199.  A ~Freference~PNKey~E allows a
  200.  new frame to be selected.
  201.  An ~Aaction~PNKey~E does some
  202.  other action.
  203.  An ~Iinput field~PNKey~E permits some
  204.  value to be entered.
  205. .
  206. .NOTE Notepad
  207.  The notepad allows you to store a
  208.  reference that you may want to use
  209.  later. The INS key adds the reference
  210.  pointed at to the notepad, or the
  211.  current frame if not pointing at any.
  212.  The DEL key deletes a reference.
  213.  The NOTEPAD option on the main menu
  214.  allows you to select from the notepad
  215.  and delete unwanted references.
  216. .
  217. .NOTE Selecting
  218.  Use the cursor keys or the TAB and
  219.  SHIFT/TAB keys to move to a reference
  220.  Press RETURN to select the reference.
  221.  Press ESCAPE for the control menu, or
  222.  to cancel a menu, note or list.
  223.  
  224.  When using a mouse, move mouse to
  225.  position cursor to select a reference,
  226.  Press LEFT mouse button to select.
  227.  Press RIGHT mouse button for the
  228.  control menu or to cancel a menu,
  229.  note, or list.
  230.  
  231.  See Also:- ~NFunction keys~PNFkeys~E
  232. .
  233. .NOTE notation
  234. {param} indicates an
  235.         optional parameter
  236. {param1|param2} indicates
  237.        alternative options
  238. .
  239. .NOTE Fkeys
  240.  F1 Help        F2  Full Contents
  241.  F3 Backtrack   F4  Select back
  242.  F5 Notepad     F6  Search text
  243.  F7 Type file   F8  Do action
  244.  F9 DOS Shell   F10 Quit Program
  245.  
  246.  See also: ~NKey mappings~E
  247. .
  248. .CHECK +fa
  249. .NOTE Colour configuration
  250.   1.Select colours required ---> Background colour   Foreground colour
  251.   ~DK2.Select scheme to set ─────┐  ~F~T$[~BK Black           ~PV]K~E   ~F~B$]~TK Black           ~PV[K~E
  252.   ~F~DD Default frame title     ~POD$[$]~E~DK   │  ~F~T$[~BB Blue            ~PV]B~E   ~F~B$]~TB Blue            ~PV[B~E
  253.   ~F~DT Frame text / List text  ~POT$[$]~E~DK <─┘  ~F~T$[~BG Green           ~PV]G~E   ~F~B$]~TG Green           ~PV[G~E
  254.   ~F~DR Request / Message line  ~POR$[$]~E~DK      ~F~T$[~BC Cyan            ~PV]C~E   ~F~B$]~TC Cyan            ~PV[C~E
  255.   ~F~DF Frame reference (stack) ~POF$[$]~E~DK      ~F~T$[~BR Red             ~PV]R~E   ~F~B$]~TR Red             ~PV[R~E
  256.   ~F~DE Frame reference (step)  ~POE$[$]~E~DK      ~F~T$[~BM Magenta         ~PV]M~E   ~F~B$]~TM Magenta         ~PV[M~E
  257.   ~F~DA Action reference        ~POA$[$]~E~DK      ~F~T$[~BY Brown           ~PV]Y~E   ~F~B$]~TY Brown           ~PV[Y~E
  258.   ~F~DN Note reference          ~PON$[$]~E~DK      ~F~T$[~BW White           ~PV]W~E   ~F~B$]~TW White           ~PV[W~E
  259.   ~F~DM Menu reference          ~POM$[$]~E~DK    B ~F~T$[~Bk Black blink     ~PV]k~E   ~F~B$]~Tk Grey            ~PV[k~E
  260.   ~F~DS Script reference        ~POS$[$]~E~DK    L ~F~T$[~Bb Blue blink      ~PV]b~E   ~F~B$]~Tb Bright blue     ~PV[b~E
  261.   ~F~DI Input field             ~POI$[$]~E~DK    I ~F~T$[~Bg Green blink     ~PV]g~E   ~F~B$]~Tg Bright green    ~PV[g~E
  262.   ~F~DJ Note heading and border ~POJ$[$]~E~DK    N ~F~T$[~Bc Cyan blink      ~PV]c~E   ~F~B$]~Tc Bright cyan     ~PV[c~E
  263.   ~F~DK Note text               ~POK$[$]~E~DK    K ~F~T$[~Br Red blink       ~PV]r~E   ~F~B$]~Tr Bright red      ~PV[r~E
  264.   ~F~DH Menu heading            ~POH$[$]~E~DK    I ~F~T$[~Bm Magenta blink   ~PV]m~E   ~F~B$]~Tm Bright magenta  ~PV[m~E
  265.   ~F~DC Menu choice             ~POC$[$]~E~DK    N ~F~T$[~By Brown  blink    ~PV]y~E   ~F~B$]~Ty Yellow          ~PV[y~E
  266.   ~F~DO Menu highlighted choice ~POO$[$]~E~DK    G ~F~T$[~Bw White blink     ~PV]w~E   ~F~B$]~Tw Bright white    ~PV[w~E
  267.   ~F~DP Popup messages          ~POP$[$]~E~DK      Example text
  268.   ~F~DU  Scheme U  ~POU$[$]~E~DK ~F~DX  Scheme X  ~POX$[$]~E~DK       ~T$[~B$]*** HyperShell Colour Schemes ***~DK
  269.   ~F~DV  Scheme V  ~POV$[$]~E~DK ~F~DY  Scheme Y  ~POY$[$]~E~DK
  270.   ~F~DW  Scheme W  ~POW$[$]~E~DK ~F~DZ  Scheme Z  ~POZ$[$]~E~DK      [x]  ~A Exit from configuration ~Pq~Kx~E
  271. .
  272. .MENU Colours
  273. Configure   |SColours
  274. Save config |SSave colours
  275. Load config |SLoad colours
  276. .
  277. .SCRIPT Colours
  278. V[K
  279. V]w
  280. LAgain
  281. NColour configuration
  282. JAgain
  283. .
  284. .SCRIPT Save colours
  285. Vf?filename
  286. abq
  287. w$f.hsf
  288. WOA$(&oA)
  289. WOB$(&oB)
  290. WOC$(&oC)
  291. WOD$(&oD)
  292. WOE$(&oE)
  293. WOF$(&oF)
  294. WOG$(&oG)
  295. WOH$(&oH)
  296. WOI$(&oI)
  297. WOJ$(&oJ)
  298. WOK$(&oK)
  299. WOL$(&oL)
  300. WOM$(&oM)
  301. WON$(&oN)
  302. WOO$(&oO)
  303. WOP$(&oP)
  304. WOQ$(&oQ)
  305. WOR$(&oR)
  306. WOS$(&oS)
  307. WOT$(&oT)
  308. WOU$(&oU)
  309. WOV$(&oV)
  310. WOW$(&oW)
  311. WOX$(&oX)
  312. WOY$(&oY)
  313. WOZ$(&oZ)
  314. w
  315. .
  316. .SCRIPT Load Colours
  317. Vf?filename
  318. abq
  319. c$f
  320. .
  321. .SCRIPT Calculator
  322. Ve?Enter expression (x = last result $x)
  323. Vx=$e
  324. pExpr $e = $x
  325. .
  326. .CHECK +fax
  327.  
  328. .
  329. .SCRIPT perror
  330. p@MError text($?)|Error %s
  331. .
  332. .SCRIPT Picksrch
  333. pPick a word with the mouse
  334. P;Ve&P;abq
  335. A@X$e
  336. .
  337. .SCRIPT SETUP
  338. O#
  339. O16
  340. O*11
  341. -- OUwK
  342. -- OVrk
  343. -- OTWB
  344. KF1MHelp
  345. KM1HELP
  346. KH4SMENBAR
  347. KH3Paged Help
  348. K#nF+
  349. K#pF-
  350. K#bB
  351. K#mF+1
  352. K#qQ
  353. K#iNinfo
  354. K#aNHyperShell
  355. K#lA@C1
  356. Vsfirst
  357. VZ$d?
  358. VrY?Press escape to abort at any time.   (Return to continue)
  359. .
  360. .SCRIPT MENBAR
  361. ZX1;ZY1
  362. .
  363. .PRINT Section 1.
  364. .
  365. .PRINT THIS
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.              ~F------------ HyperShell Version 5 ------------~E
  373.  
  374.                            ~DDReference guide~DT
  375.  
  376.           ~FCopyright (c) Text Technology 1988 - 1993~E
  377.                           ~FAll rights reserved~E
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.         Text Technology
  394.         66 Kennedy Avenue
  395.         Macclesfield
  396.         Cheshire
  397.         ENGLAND
  398.         SK10 3DE
  399. .
  400. .PRINT PAGE
  401. .
  402. .FRAME HyperShell Reference
  403. .TITLE Section - Introduction
  404. This hyperfile is a reference guide for use by HyperShell authors.
  405. It describes the format of the HyperShell hyperfiles and describes
  406. the specification of references, actions, functions etc. within them
  407. ~i0
  408. [1]    ~FFile Contents~K1~E        The structure of the file
  409. [2]    ~FReferences~K2~E        Reference and formatting flags
  410. [3]    ~FActions~K3~E            Command strings
  411. [4]    ~FAction modifiers~PFAction modifier functions~K4~E    Functions returning parameters
  412. [5]    ~FVariables~K5~E        Information storage
  413. [6]    ~FConditions~K6~E        Condition codes
  414. [7]    ~FRestrictions~K7~E        Limits and reserved characters
  415. [8]    ~FCodes~K8~E            Codes and settings
  416. [9]    ~FGeneral~K9~E            Miscellaneous
  417. ~i5
  418. .
  419. .PRINT SECTION 2.
  420. .
  421. .PRINT TITLE
  422. Reference Guide - Hyperfile structure
  423. .
  424. .PRINT PAGE
  425. .
  426. .FRAME File contents
  427. .TITLE Section - Hyperfile structure
  428. ╔══════════╗ ╔══════════╗                ┌── ╔═════════════════╗
  429. ║    H     ║ ║ ~F.INDEX~PFIndex~E   ║ ╔══════════╗   │   ║ ~F.REMARK~PFRemarks~E         ║
  430. ║          ║ ║══════════║ ║ ~F.HEADER~PFHeader~E  ║   │   ║ ~F.SCRIPT SETUP~PFSetup Script~E   ║
  431. ║    Y     ║ ║  ~FGLOBAL~PFGlobal Items~E  ║ ║ ~F.FOOTER~PFFooter~E  ║   │   ║ ~F.NOTE name~PFNotes~E      ║
  432. ║          ║ ║  ITEMS   ║ ╚══════════╝   │   ║ ~F.MENU name~PFMenus~E      ║
  433. ║    P     ║ ║ - ~DM OR ~DT - ║ ╔══════════╗ ──┘   ║ ~F.SCRIPT name~PFScripts~E    ║
  434. ║          ║ ║          ║ ║ OTHER    ║       ║ ~F.PRINT command~PFPrint~E  ║
  435. ║    E     ║ ║ ~F.SHARE~PFShare~E   ║ ║ ITEMS    ║       ║ ~F.CHECK flags~PFCheck~E    ║
  436. ║          ║ ╚══════════╝ ╚══════════╝ ───── ╚═════════════════╝
  437. ║    R     ║ ╔══════════╗ ─────── ╔════════╗ ╔═════════════════╗
  438. ║          ║ ║          ║ ─────┐  ║ FRAME  ║ ║ ~F.FRAME~PFFrames~E ~Fname~PFFrame Name~E     ║
  439. ║    F     ║ ║ FRAME    ║      │  ║ SPEC.  ║ ║ ~F.TITLE text~PFTitle~E     ║
  440. ║          ║ ║          ║      │  ║        ║ ╠═════════════════╣
  441. ║    I     ║ ║ ~FSPECS~PFFrames~E    ║      │  ║        ║ ║ ~F.REMARK~PFRemarks~E         ║
  442. ║          ║ ║          ║      │  ║ ~FLOCAL~PFLocal Items~E  ║ ║ ~F.NOTE name~PFNotes~E      ║
  443. ║    L     ║ ║          ║      │  ║        ║ ║ ~F.MENU name~PFMenus~E      ║
  444. ║          ║ ║          ║      │  ║ ITEMS  ║ ║ ~F.SCRIPT name~PFScripts~E    ║
  445. ║    E     ║ ║          ║      │  ║        ║ ║ ~F.PRINT command~PFPrint~E  ║
  446. ╚══════════╝ ╚══════════╝      └─ ╚════════╝ ╚═════════════════╝
  447. .
  448. .FRAME Remarks
  449. .TITLE So you know why you did it
  450.  .REMARK
  451.  text lines
  452.  
  453. A remark section can appear anywhere in the hyperfile, between
  454. other sections. It is followed by lines of text containing
  455. information for the hyperfile author only, and will not be
  456. displayed during a HyperShell session.
  457.  
  458. Remark sections can be placed before other sections to describe the
  459. function of those sections.
  460.  
  461. The section, like all sections, is terminated by the next section
  462. identifier (any line starting with '.').
  463. .
  464. .FRAME Check
  465. .TITLE To control the checker component
  466.  .CHECK {-options}{+options}
  467.  
  468. The Check specification is a single line 'section' signalling the
  469. settings of flags for use by the HyperShell Checker utility (HC).
  470. For details of the parameters, see the chapter on the HyperShell
  471. Checker in the operation guide.
  472.  
  473. This section is ignored by HyperShell, although it does signify
  474. a new section, and therefore terminates a previous section.
  475. .
  476. .FRAME Print
  477. .TITLE To control the HP printout
  478.  .PRINT command
  479.  
  480. The Print section is used to control the HyperShell Printer
  481. utility (HP). The following commands are supported by HP.
  482.  
  483.    .PRINT TITLE    take next line as title string
  484.     (can be used to change the title throughout the hyperfile
  485.    .PRINT PAGE    force new page
  486.    .PRINT SECTION prefix
  487.        define new section prefix and reset frame serial number
  488.    .PRINT THIS     print subsequent lines up to next line
  489.        starting with '.', recognizing format and highlight flags
  490.    .PRINT OFF    disable printing
  491.    .PRINT ON    enable printing
  492.    .PRINT WPOFF print as formatted
  493.    .PRINT WPON  output paragraph as single line, for word processor
  494.    .PRINT LIMIT nn/g    limit print output for encrypted file
  495.  
  496. This section is ignored by HyperShell, although it does signify
  497. a new section, and therefore terminates a previous section.
  498. .
  499. .FRAME Share
  500. .TITLE sharing globals with another hyperfile
  501.  .SHARE
  502.  
  503. Indicates that the hyperfile will use the global items from a
  504. master hyperfile (the first hyperfile loaded i.e. the one named
  505. on the command line). All global notes, menus and scripts
  506. (including the SETUP script) are shared, as well as HEADER and
  507. FOOTER sections. Any global items specified within the secondary
  508. hyperfile will only be accessible from that hyperfile, and only
  509. if an item of the same name does not exist in the main hyerpfile.
  510. If an ~FINDEX~E is needed for the hyperfile, this may be specified.
  511. Also .REMARK, .PRINT and .CHECK directives may be used. The
  512. secondary hyperfile can also have local items specified with
  513. the frames.
  514.  
  515. This is used for splitting large hyperfiles, where a main entry
  516. point can always be used. It is necessary to ensure that any
  517. frame references in global items to frames in the secondary
  518. hyperfile are fully qualified (i.e. they specify the frame
  519. name and hyperfile in the form 'frame^file').
  520. ~G
  521. The ~FPreload hyperfile~E action can be used to load the
  522. secondary hyperfiles in the SETUP script of the master file.
  523.  
  524. The SETUP script will not be performed when moving between
  525. frames in hyperfiles sharing the same globals.
  526.  
  527. Contents lists will only cover the current hyperfile, but a
  528. search action of the form 'A@s' will present a list of all
  529. frames in all loaded hyperfiles. 
  530. .
  531. .FRAME Header
  532. .TITLE Fixed information at the top of the frame
  533.  .HEADER
  534.  (text with ~Freferences~E and ~Fformatting~E)
  535.  
  536. The header section provides the text that will appear at the top of
  537. the frame display. By convention it contains the name and title of
  538. the frame being displayed, and may also contain date, time,
  539. hyperfile name etc.
  540.  
  541. The header section is optional. If omitted, a default title is
  542. displayed showing the frame name and title.
  543.  
  544. A 'null' header consisting of a .HEADER line followed by another
  545. '.' line may be used if each frame is to have a different form, and
  546. does not need the default title.
  547.  
  548. The header display can be suppressed for certain frames by starting
  549. the frame ~Ftitle~E with a ')' character.
  550. .
  551. .FRAME Footer
  552. .TITLE Fixed information at the bottom
  553.  .FOOTER
  554.  (text with ~Freferences~E and ~Fformatting~E)
  555.  
  556. The footer section is optional, and provides the text that will
  557. appear at the bottom of the frame display. It is usual to position
  558. it at a fixed line location (Using ~FLine positioning~E) so that
  559. it appears in the same place for each frame. The footer usually
  560. contains references that are present for all frames in the file,
  561. such as a help ~Fnote~PFNotes~E display, a function key
  562. map, a backtrack count display etc.
  563.  
  564. Alternative and conditional footer texts can be set up using the
  565. conditional hidden line flag (~~hn), and these can be triggered for
  566. each frame using the local setting flag (~~Jn) which sets the
  567. frame local flags e.g.
  568.  
  569.     .FOOTER
  570.     ~~h8Footer text one
  571.     ~~h8text one continued~~G
  572.     ~~h9~~G
  573.     Default footer text
  574.     more default footer
  575.     yet more default footer
  576.     .
  577.     
  578. The frame text can then code ~~J8 for footer text one, ~~J9
  579. for no footer and default footer text if no ~~J specified.
  580. If no default required, then only conditional lines are
  581. included. The ~~J8 can be included at the end of the first
  582. text line in the frame, or of course can be set up by actions.
  583.  
  584. If a footer is specified in this manner, then the maximum
  585. depth MUST be set up in the SETUP script using the ZF
  586. action. For the above, this would be ZF3.
  587.  
  588. Also the footer display can be suppressed for a frame by
  589. starting the frame ~Ftitle~E with a ')' character.
  590. .
  591. .FRAME Global Items
  592. .TITLE Accessible from all frames
  593. Global items are accessible from any frame in the hyperfile.
  594.  
  595. Global items are specified at the start of the hyperfile,
  596. before any frame specifications.
  597.  
  598. ~FReferences~E to global items and actions invoking global items
  599. generally start with a capital letter, whereas those to ~Flocal items~E
  600. start with a lowercase letter.
  601. .
  602. .FRAME Local Items
  603. .TITLE Accessible from one frame only
  604. Local items are only accessible from the frame which specifies them.
  605.  
  606. Local Items are specified after a frame for which they are to be
  607. local. They may only be accessed when that frame is on display,
  608. or when a paged list has been displayed from that frame.
  609.  
  610. ~FReferences~E to local items generally start with a lowercase letter.
  611. If the local item specified in a reference or action does not
  612. exist, a global item with the same name is used, if it exists.
  613. .
  614. .FRAME Setup Script
  615. .TITLE To configure the hyperfile
  616.  .SCRIPT SETUP
  617.  (limited ~Factions~E)
  618.  
  619. The setup ~Fglobal script~PFScripts~E is acted upon when the hyperfile is loaded,
  620. and when the hyperfile is re-entered after displaying frames from
  621. another hyperfile. It is used to ~Fset key mapping~Es and to set
  622. control options. An initial note display or certain other actions
  623. may also be performed at this stage, but remember that the script
  624. is used on reentry as well as at load time, so may well be executed
  625. many times when the user switches between hyperfiles. It is
  626. imperative not to do a frame display, or any action which would
  627. ultimately cause a frame display.
  628.  
  629. The setup script is optional.
  630. .
  631. .FRAME Index
  632. .TITLE For large hyperfiles
  633.  .INDEX
  634.  
  635. The .INDEX line may be present anywhere before the first frame
  636. specification. It signals that an index file is usually present for
  637. the frame. An index file is useful when the hyperfile is above a
  638. certain size, as it saves HyperShell from having to read all the
  639. way through the hyperfile to build its internal index. Opening and
  640. reading the index file has its overheads, however, so its not
  641. always helpful to have the index file in use. An index is generally
  642. of use when a hyperfile has above 30 frames of reasonable size.
  643.  
  644. The index file is maintained automatically, and is kept in the same
  645. directory as the hyperfile. It has the same name as the hyperfile,
  646. but with an extension of .HIX. If you modify the hyperfile,
  647. HyperShell will detect this and rebuild the index for you. If you
  648. delete the index, a new one will also be built. If the .INDEX line
  649. is not present, HyperShell does not try to use index files.
  650. .
  651. .FRAME Frames
  652. .TITLE The unit of display for HyperShell
  653. Frame specifications are started by a .FRAME keyword. The frame
  654. specification will terminate with the next .FRAME keyword or the
  655. end of the file. There must be at least one frame specification
  656. in a hyperfile. The frame specification includes the frame name
  657. and optional title, along with the text which is to be displayed
  658. for the frame. ~FLocal items~E may follow the frame text.
  659.  
  660. ┌───────────────────────────────────────────────────────────────┐
  661. │   .FRAME ~Fframe name~E~C70│
  662. │   .TITLE ~Ftitle text~PFtitle~E~C70│
  663. │   (~Fframe text~PFtext~E with ~Freferences~E and ~Fformatting~E)~C70│
  664. │   .MENU ~Fmenu name~PFmenus~E        \~C70│
  665. │   (options)                 \~C70│
  666. │   .NOTE ~Fnote name~PFnotes~E          \ Can be a number~C70│
  667. │   (text with references and formatting)      /    of these~C70│
  668. │   .SCRIPT ~Fscript name~PFscripts~E     /~C70│
  669. │   (actions)        /~C70│
  670. │   ~F.END~PFend~E~C70│
  671. └───────────────────────────────────────────────────────────────┘
  672. .
  673. .FRAME Frame Name
  674. .TITLE The key to the frame
  675.  .FRAME frame name
  676.  
  677. The frame name provides the key to the frame. It is very important
  678. to choose the frame name carefully. The frame name will be used to
  679. cross reference the frame from text in other frames, and it is most
  680. useful if the form of name used in open text is chosen for the frame
  681. name. It is not essential to do this, however, as other words or
  682. phrases can be cross referenced to the frame using ~Fparameter~PFParameter section~Es in
  683. the ~Fframe reference~Es, hidden from display, that refer to the real
  684. frame name.
  685.  
  686. In general, duplicate frame names should be avoided, as references
  687. cannot then uniquely identify the frame. The first such name is
  688. selected normally, although see ~FFrame selection~E for details of
  689. how duplicate frames can be selected. Also the frame stepping and
  690. backtracking operations can handle duplicate frames. Note that the
  691. HyperShell editor and checker do not support duplicate frame names.
  692.  
  693. The frame name is limited to 35 characters.
  694. .
  695. .FRAME Title
  696. .TITLE A description of the frame
  697.   .TITLE title text
  698.  
  699. This line is optional. However, note that the frame title is normally
  700. displayed in the frame display ~Fheader~E. It is also displayed in
  701. any ~Fpaged displays~E containing frame lists, and is used by the
  702. ~Fsearch selection~E to locate frames about particular topics.
  703. It is therefore reasonably important, and well worth providing.
  704.  
  705. The frame title is limited to 40 characters.
  706.  
  707. If the title for a frame starts with a ')' character, the header
  708. and footer are not displayed for that frame, and the text can use
  709. the bottom line, which is usually kept clear. This may be used for
  710. full screen displays such as those captured from other programs
  711. and translated through the editor components.
  712. .
  713. .FRAME Text
  714. .TITLE The contents of the frame
  715. The frame text comes after the frame name (and title) lines. It
  716. contains the text specific to the frame. This will be displayed
  717. between the ~Fheader~E and ~Ffooter~E sections. The text may
  718. contain embedded ~Freferences~E to other ~Fframes~E, ~Fnotes~E,
  719. ~Fmenus~E and other ~Factions~E. Frame references can either be
  720. explicitly marked or may be automatically highlighted using the
  721. ~Fautoreference~E facility.
  722.  
  723. It is recommended that frame text does not take up more than the
  724. number of lines left after the header and footer have been allowed
  725. for. If this does occur, a message is displayed indicating that
  726. further text may be displayed by pressing the PgDn key. Also it is
  727. possible to return to the first screen of a frame by pressing the
  728. Home key. A formatting trigger is provided which will force a
  729. '~Fscreen break~E' after the line in which it occurred. The frame
  730. text is displayed to a width of 80 characters, extra characters
  731. being ignored.
  732. ~G
  733. Graphic and other characters from the 256 character set may be
  734. used to draw boxes etc.
  735.  
  736. A double line box may or an area of different colour may also be
  737. drawn automatically using the area drawing flags ~~a and ~~b.
  738.  
  739. Automatic indenting of text can be performed by the use of the
  740. ~Findent flag~E ~~i.
  741.  
  742. .
  743. .FRAME Notes
  744. .TITLE Popup windows of text
  745.  .NOTE note name
  746.  (text with ~Freferences~E and ~Fformatting~E)
  747.  .
  748.  
  749. Notes are small popup windows of text which supply general
  750. information or information additional to the ~Fframe text~PFText~E. 
  751. They may contain ~Fformatting~E and ~Freference triggers~PFReferences~E.
  752.  
  753. The note name can be up to 35 characters.
  754.  
  755. Notes have a size limit of 22 lines of 76 characters. 
  756.  
  757. ~FGlobal~PFGlobal Items~E notes are used for general information in support of
  758. the main material and for help displays.
  759.  
  760. ~FLocal~PFLocal Items~E notes are used for information in support of the frame
  761. to which it is local.
  762.  
  763. Selections from a note cause the note to be cleared before
  764. continuing.
  765. .
  766. .FRAME Menus
  767. .TITLE Popup selections
  768.  .MENU menu name
  769.  (options)
  770.  .
  771.  
  772. Menus are popup items which show a list of options for selection.
  773. Each option is supplied on a separate line, and consists of the
  774. choice text, and optionally the associated action for the choice.
  775. For a menu invoked using the ~FM action~PFPopup menu display~E the options are treated as
  776. frame names, if the action string is not supplied. An action
  777. string is separated from the choice text by the '|' character.
  778. If action type indicator symbols (see ~FOptions~E) are to be used, it
  779. is good practice to line up the action separator, so that the
  780. symbols line up on the right of the menu display.
  781.  
  782. The menu name should not exceed 20 characters. There is no limit
  783. to how many items can appear in a menu, but only 20 options are
  784. displayed at a time, scrolling being performed by the selection
  785. of the scrolling option on the top and/or bottom.
  786.  
  787. For multi-page menus, the up/down arrows will switch to the prev or
  788. next page of menu when they reach the corresponding end of the menu
  789. display. The PgUp and PgDn keys may be used to move up and down
  790. through the menu pages.
  791. ~G
  792. ~X1Example:
  793.  
  794. The following menu has the actions described afterwards:-
  795.  
  796.    .MENU various
  797.    starting
  798.    help        |Nhelp
  799.    next frame  |F+
  800.    exit program|Q
  801.     .
  802.  
  803. The first option, when selected, displays the frame 'starting' in
  804. the current hyperfile.
  805.  
  806. The second option displays a global popup note called 'help'.
  807.  
  808. The third option moves to the next frame.
  809.  
  810. The fourth option quits the HyperShell program.
  811. ~G
  812. A menu may also be used as a lookup table, and referenced via the
  813. lookup modifier (e.g. Mmenuname[key]). In this case it is necessary
  814. to place the action separator directly after the option text, and
  815. to always supply the action string. If a menu is to be used with a
  816. direct index specifier (e.g. Mmenuname(3)), the action string is
  817. not normally required.
  818.  
  819. Menus can have options which are conditional. These are indicated
  820. by lines starting with a '?' or a '\' character, followed by a
  821. single character ~Fcondition code~PFconditions~E. For the '?' variant,
  822. the menu option is included in the menu if the condition is TRUE,
  823. otherwise it is excluded. For the '\' variant, the line is only
  824. included if the condition is FALSE. Thus the following menu displays
  825. different options depending on the setting of the error status.
  826.  
  827.    .MENU errors
  828.    ?sClear error status  |Y
  829.    ?sShow error status   |P$?
  830.    \sRun program         |D123
  831.    .
  832. .
  833. .FRAME Scripts
  834. .TITLE Sequences of actions
  835.  .SCRIPT script name
  836.  (limited ~Factions~E)
  837.  .
  838.  
  839. Scripts are sequences of actions, used where a simple action string
  840. or a multiple action string are not sufficient. A script can be used
  841. to display a sequence of notes, to input a number of variables to
  842. construct a command line, or for many other more complex purposes. 
  843.  
  844. Scripts are limited to 200 lines, and each line may contain a
  845. number of actions up to a maximum length of 128 characters.
  846.  
  847. A script is terminated when:-
  848.  
  849.     1.    It reaches the end, or a 'q' action
  850.     2.    A further script is called
  851.     3.    ESC is pressed to cancel a menu or other display
  852.     4.    A new frame is displayed (unless using 'f' action)
  853. ~G
  854. A number of control actions exist to allow looping and conditional
  855. branching, and ~Fexpression evaluation~E permits simple integer
  856. arithmetic to be performed on ~Fvariables~E. The ~FJump within script~E
  857. and ~FLabel in script~E actions may be used to perform control flow.
  858. ~FSubroutines~PFCall subroutine~E can exist within scripts to perform common
  859. sequences of actions.
  860.  
  861. Lines starting with a '-' sign are treated as comment lines,
  862. and are not loaded with the script. Also completely blank lines
  863. are ignored. It is helpful to have comments to explain how the
  864. script works, for when you need to change the script.
  865.  
  866. Lines in the script can be indented with spaces or tabs, and
  867. these are ignored when the script is loaded. Indentation can
  868. show the structure of a script.
  869.  
  870. A script can contain a line of the form
  871.  
  872.     +scriptname
  873.  
  874. in which case script 'scriptname' is appended to the script.
  875. Only one script can be appended, although that can itself append
  876. another script. The total number of lines is limited to 200.
  877. Subroutines can then exist in a separate script which can be
  878. appended to script wishing to use them. If this is done, the first
  879. line of the script can be a 'q' action, in case the first script
  880. runs off the end by accident. A local script of the given name is
  881. firstly looked for, and then a global script, if a local script
  882. is not found.
  883.     
  884. Scripts cannot be 'nested'. When a script calls another script
  885. the original script is cleared first, effectively 'chaining'
  886. from one to another.
  887.  
  888. Also see ~FScript control structures~E for details of how control
  889. loops can be coded in scripts.
  890.  
  891. An ~Fexample script~E is provided to show how the control flow
  892. actions can be used.
  893.  
  894. Also see ~FLabel in script~E for details of how problems
  895. with scripts can be dealt with.
  896. .
  897. .FRAME Script control structures
  898. .TITLE Block structures using { and }
  899.  
  900. These block control structures have been introduced to facilitate the
  901. production of complex scripts, and to improve the maintainability and
  902. readability of scripts.  The control structures may only be used in
  903. scripts. Any kind of script may utilise these, including the SETUP
  904. script.  Indentation of levels may be used to help readability.
  905.  
  906. The '{' and '}' characters are used to indicate the start and end of
  907. control flow structures. They must appear as the first non-blank
  908. character on a line. They are explained below.
  909.  
  910. They must not have anything else after them on the line, and cannot
  911. have multiple actions on the same line.
  912.  
  913. Some of these count as two lines (out of the maximum of 200 for a
  914. script), so care must be taken when writing large scripts.
  915.  
  916. Blocks may be nested. eg. an if block may have a loop within it.  The
  917. maximum nesting depth is 10.
  918.  
  919. If/Else block
  920.  
  921.       {ic
  922.        - if c true -
  923.       }
  924.  
  925.          and, for 'if not'
  926.  
  927.       {nc
  928.        - if c false -
  929.       }
  930.  
  931.          or the extended form, for 'if / else'
  932.  
  933.       {ic
  934.        - if c true -
  935.       }e{
  936.        - if c false -
  937.       }
  938.  
  939.          and, for 'if not / else'
  940.  
  941.       {nc
  942.        - if c false -
  943.       }e{
  944.        - if c true -
  945.       }
  946.  
  947. While and Until loops
  948.  
  949. 1. Start condition
  950.  
  951. Actions are not performed if condition not met
  952.  
  953.       {wc
  954.        - while c true -
  955.       }
  956.  
  957.       {uc
  958.        - until c true -
  959.       }
  960.  
  961. 2. End condition
  962.  
  963. Actions are performed at least once in all cases
  964.  
  965.       {
  966.        - while c true -
  967.       }wc
  968.  
  969.       {
  970.        - until c true -
  971.       }uc
  972.  
  973. It is possible to have both a start and end condition on the same
  974. loop. eg:-
  975.  
  976.       {wc
  977.        - while c true -
  978.        - until d true -
  979.       }ud
  980.  
  981. General loop
  982.  
  983.       {
  984.        - actions -
  985.       }
  986.  
  987. or
  988.  
  989.       {
  990.        - actions -
  991.       }xc{
  992.        - actions -
  993.       }
  994.  
  995. - The }xc{ will exit the loop at that point if condition c is true.
  996.   The condition # may be used for unconditional exits.
  997.  
  998. - More than one }xc{ may appear in the loop.
  999.  
  1000. - A }xc{ may also appear in a while or until loop.
  1001.  
  1002. - A }e{ or }xc{ must appear at the correct level. ie. it must
  1003.   not appear in an inner loop or inner if structure.
  1004.  
  1005. - A }e{ in a loop structure, or a }xc{ in an if structure will be
  1006.   treated as the end of that structure (ie. as a } without arguments).
  1007.  
  1008. Example 1. File processing
  1009.  
  1010.       -- open file
  1011.       rdata.txt
  1012.       {
  1013.         -- read record from file
  1014.         Rabcd
  1015.         -- exit loop if end of file
  1016.       }xz{
  1017.         -- if an order record, process it
  1018.         vaorder
  1019.         {ie
  1020.           oItem $b, quantity $c, price $d
  1021.           Vt=c*d
  1022.           oTotal price $t
  1023.         -- else report record type
  1024.         }e{
  1025.           pRecord type $a not processed
  1026.         }
  1027.       }
  1028.       -- close file
  1029.       r
  1030.  
  1031. Example 2. Data entry
  1032.  
  1033.       -- open file
  1034.       wnames.dat
  1035.       {
  1036.          Vx?name
  1037.          -- if not blank, write to output
  1038.          {nb
  1039.             wName added = $x
  1040.          }
  1041.       -- loop until blank input
  1042.       }ub
  1043.       -- close file
  1044.       w
  1045.  
  1046. .FRAME End
  1047. .TITLE The end of the frame specification
  1048. The .END keyword indicates the end of the frame specification.
  1049.  
  1050. It is present for historical reasons, and serves no purpose
  1051. other than to indicate to the author where a frame finishes.
  1052. This may therefore be omitted, as the next frame specification
  1053. serves the same purpose.
  1054. .
  1055. .PRINT SECTION 3.
  1056. .
  1057. .PRINT TITLE
  1058. Reference Guide - References
  1059. .
  1060. .PRINT PAGE
  1061. .
  1062. .FRAME References
  1063. .TITLE Section - link references and control flags
  1064. In the frame text, in the text of a popup note and in the text of
  1065. a file displayed using the 'Type file' action, control sequences
  1066. can exist to indicate references to other items, which are
  1067. highlighted in the text, and to perform text formatting actions.
  1068.  
  1069. Reference control sequences have the general form:-
  1070.  
  1071.    ~~?text string~~E   OR   ~~?text string~~Paction string~~E
  1072.  
  1073. Where ? is the reference type identifier, and text string is the
  1074. text to be displayed, highlighted in a manner applicable to its
  1075. type, in the frame text display. action string is an optional
  1076. action string which will be performed instead of the implicit
  1077. action for the reference if the reference is selected.
  1078.  
  1079. The text string and action string elements are limited to 39
  1080. characters (although a longer text string may be used where
  1081. an action string is supplied).
  1082. .
  1083. .FRAME Frame reference
  1084. .TITLE Flags ~~F and ~~f
  1085. ~~Fframe name~~E
  1086. ~~Freference~~PFframe name~~E
  1087.  
  1088. The frame reference is introduced by the ~~F or ~~f sequence. The
  1089. ~~F reference adds the reference to the backtrack list, when
  1090. selected. The ~~f reference replaces the top entry on the backtrack
  1091. list. Thus ~~F is used for browsing or cross references, and ~~f is
  1092. used for deliberate frame sequencing or hierarchical references.
  1093. The ~~f type of reference is highlighted in a different manner to
  1094. tell the user that selection of the reference will not allow
  1095. backtracking. A ~Fparameter section~E (~~P) may be added to supply an
  1096. explicit action string to be performed on selection.
  1097.  
  1098.     ~~Fdeleting~~PFDelete~~E     - reference to frame 'Delete'
  1099. .
  1100. .FRAME Note reference
  1101. .TITLE Flags ~~N and ~~n
  1102. ~~Nnote name~~E
  1103. ~~Nreference~~PNnote name~~E
  1104.  
  1105. The note reference is introduced by the ~~N or ~~n sequence. The
  1106. ~~N reference is a global note, whose specification occurs at the
  1107. start of the hyperfile, before the first frame specification. The
  1108. ~~n reference is a local note, whose specification lies within the
  1109. current frame specification, after the frame text and before the
  1110. next frame. A parameter section (~~P) may be added to supply an
  1111. explicit action string to be performed on selection.
  1112.  
  1113.    ~~NHelp~~E       - reference to global note 'Help'
  1114. .
  1115. .FRAME File note reference
  1116. .TITLE Flag ~~t
  1117. ~~tfile name~~E
  1118. ~~treference~~Ptfile name~~E
  1119.  
  1120. The file note reference is introduced by the ~~t sequence. This
  1121. causes a file with a name equal to the reference (and with default
  1122. extension '.NTE') to be displayed as a popup note. See the 't'
  1123. action for further details. A parameter section (~~P) may be added
  1124. to supply an explicit action string to be performed on selection.
  1125.  
  1126.     ~~tmemo~~E     - reference to file MEMO.NTE
  1127. .
  1128. .FRAME Menu reference
  1129. .TITLE Flags ~~M and ~~m
  1130. ~~Mmenu name~~E
  1131. ~~Mreference~~PMmenu name~~E
  1132.  
  1133. The menu reference is introduced by the ~~M or ~~m sequence. The
  1134. ~~M reference is a global menu, whose specification occurs at the
  1135. start of the hyperfile, before the first frame specification. The
  1136. ~~m reference is a local menu, whose specification lies within the
  1137. current frame specification, after the frame text and before the
  1138. next frame. A parameter section (~~P) may be added to supply an
  1139. explicit action string to be performed on selection.
  1140.  
  1141.    ~~msizes~~E      - reference to local note 'sizes'
  1142. .
  1143. .FRAME Script reference
  1144. .TITLE Flags ~~S and ~~s
  1145. ~~Sscript name~~E
  1146. ~~Sreference~~PSscript name~~E
  1147.  
  1148. The script reference is introduced by the ~~S or ~~s sequence. The
  1149. ~~S reference is a global script, whose specification occurs at the
  1150. start of the hyperfile, before the first frame specification. The
  1151. ~~s reference is a local script, whose specification lies within
  1152. the current frame specification, after the frame text and before
  1153. the next frame. A parameter section (~~P) may be added to supply an
  1154. explicit action string to be performed on selection.
  1155.  
  1156.      ~~Scalculate~~E      - reference to global script 'calculate'
  1157. .
  1158. .FRAME Action reference
  1159. .TITLE Flag ~~A
  1160. ~~Areference~~Paction string~~E
  1161.  
  1162. The action reference is introduced by the ~~A sequence. This form
  1163. of reference contains an action which is not a frame, note, menu or
  1164. script reference. It covers the miscellaneous actions whose
  1165. multiplicity precludes the use of specific highlighting schemes.
  1166. The action reference usually contains the parameter section (~~P
  1167. sequence), as it has no implicit action. If the reference text
  1168. can be used as an action, then the parameter may be omitted.
  1169.  
  1170.     ~~Agreen~~PPindicates safety~~E   - reference to popup message
  1171. .
  1172. .FRAME Input field
  1173. .TITLE Flag ~~I
  1174. ~~Iinput area~~Paction pattern~~E
  1175.  
  1176. The input field is not exactly a reference, but is used to input
  1177. data to be used by the application. Its most general use is to
  1178. input variable values. The input field always has reference text
  1179. and a parameter section, which specifies a pattern within which
  1180. the input value is substituted prior to execution.
  1181.  
  1182. The reference text part of the input field delimits the field, and
  1183. provides the text which is to be edited to form the input to the
  1184. field. If the input field is being used to set a variable, the
  1185. reference text usually contains an expansion token for the variable,
  1186. so that when the frame is displayed, the current value is displayed
  1187. in the field and can be edited. The field should contain a width
  1188. specification after any reference text, which will determine the
  1189. width of the input field. If new input is always required, the
  1190. field should be blank, just a width being supplied in the reference
  1191. text.
  1192. ~G
  1193. The parameter section usually consists of a variable assignment and
  1194. sometimes some other action. The parameter string provides a
  1195. pattern, within which the input value is substituted. The string
  1196. can contain up to three occurences of the string '%s', each of
  1197. which will be replaced by the value when it is input.
  1198.  
  1199. An example of a line containing an input field is as follows:-
  1200.  
  1201.    Name : ~~I$$n~~W15~~PVn%s;scheckname~~E
  1202.  
  1203. This, when selected, allows the current value of variable 'n'
  1204. to be edited (up to 15 characters in length), which is the assigned
  1205. back to variable 'n' and checked using local script 'checkname'.
  1206. When displayed, this will look like (assuming variable n contains
  1207. 'Fred Jones'):-
  1208.  
  1209.    Name : ~DIFred Jones     ~DT
  1210.  
  1211. The input field may also be specified in a note, although the note
  1212. display will terminate after entry of the input field.
  1213. .
  1214. .FRAME Parameter section
  1215. .TITLE Flag ~~P
  1216. The parameter section, introduced by the ~~P sequence, permits any
  1217. action to be associated with a reference. It is usual, and helpful,
  1218. to use the same type of action as that suggested by the initial
  1219. introductory sequence, as it is that which has already determined
  1220. the highlighting scheme for the reference. If a miscellaneous
  1221. action for which there is no set colour scheme is to be performed,
  1222. the ~Faction reference~E should be used.
  1223.  
  1224. See also ~FActions selected from note~E
  1225.          ~FSingle line help string~E
  1226. .
  1227. .FRAME Actions selected from note
  1228. .TITLE Special flag !
  1229. If an action string in a reference in the note text has a '!' at the
  1230. start, the action string is executed immediately the reference is
  1231. selected, without popping down the note. The '!' is removed before the
  1232. action is performed.
  1233.  
  1234. IMPORTANT NOTE:- DO NOT use actions resulting in other popup items,
  1235. message line outputs or inputs, or movement to another frame,
  1236. otherwise results will be unpredictable.
  1237.  
  1238. This is useful for multiple input fields, and for other dialogue box
  1239. features.
  1240.  
  1241. Positioning using the ~~X and ~~Y are relative to the top left, so if
  1242. actual position is to be used, window should be reset to the full
  1243. screen using Zr first.
  1244.  
  1245. eg.
  1246.  
  1247.       .NOTE dialogue
  1248.       This handles a set of toggles
  1249.       toggle local flag 1 ~~A.~~P!Stoggle(1)~~K1~~E
  1250.       toggle local flag 2 ~~A.~~P!Stoggle(2)~~K2~~E
  1251.       toggle local flag 3 ~~A.~~P!Stoggle(3)~~K3~~E
  1252.       .SCRIPT toggle
  1253.       -- first toggle flag
  1254.       ZL$$\#
  1255.       -- then set display flag accordingly
  1256.       a$$\VS*
  1257.       z$$\VS.
  1258.       -- reset for display
  1259.       Zr
  1260.       -- get x and y coords
  1261.       VX&w1;VY&w2
  1262.       -- display . or *
  1263.       i~X$$X~Y$$Y$$S
  1264.       .
  1265. .FRAME Single line help string
  1266. .TITLE Use of + in action string
  1267.  
  1268. A facility is provided to allow single line help strings to appear
  1269. for references over which the mouse is positioned. This facility is
  1270. triggered by the action string for the reference starting with a
  1271. psuedo-action of the form:-
  1272.  
  1273.      +x
  1274.  
  1275. If the mouse cursor is positioned over such a reference, the action
  1276. mapped to the single quote character will be performed (' = ASCII
  1277. 39).  When the cursor is moved away from such a reference, the
  1278. action mapped to the single backquote character is performed (` =
  1279. ASCII 96).  The action should be set up in the SETUP script to
  1280. perform a 'p' action. For example:-
  1281.  
  1282.     K#'p@Mhelpline[$$$$(&Q2)]
  1283.  
  1284. This example uses a menu (which can be either a global or a local
  1285. menu) as a lookup table, to supply the text for the help line. Note
  1286. that the &Q function is used to extract the first two characters of
  1287. the reference string for use as a key for this purpose (The
  1288. parameter to the &Q function has been added in support of this for
  1289. HyperShell V5).
  1290.  
  1291. The action for the off-reference mapping should simply clear the
  1292. message line as follows:-
  1293.  
  1294.       K#`p
  1295.  
  1296. The menu should then be defined in the following manner:-
  1297.  
  1298.     .MENU helpline
  1299.     +1|Help notes
  1300.     +2|Contents list
  1301.     +3|Backtrack to last frame
  1302.     +4|Main menu
  1303.     +5|Print frame
  1304.     +6|Search for text
  1305.     +7|Type a file
  1306.     +8|Perform HyperShell action
  1307.     +9|DOS shell
  1308.     *|No help available
  1309.     .
  1310.  
  1311. The '*' acts as a default in case a string has not been supplied
  1312. for a particular reference.
  1313.  
  1314. So, if a reference is defined as follows:-
  1315.  
  1316.     ~~MHelp~~P+1;MHelp~~E
  1317.  
  1318. and the cursor is positioned over the reference, the help message
  1319. 'Help notes' is displayed on the message line.
  1320.  
  1321. It is also possible to define named variables which contain the
  1322. help message strings. An example of this is given in the graphic
  1323. hypershell demo hyperfile.
  1324. .FRAME Key mapping
  1325. .TITLE Flag ~~K
  1326. The key mapping sequence, introduced by ~~K, permits a key on the
  1327. keyboard to be mapped to the reference, such that when it is
  1328. pressed, the reference is selected. This is useful for 'menu'
  1329. frames. A key mapped using the 'K' action takes precedence over
  1330. this form of key mapping. The reference:-
  1331.  
  1332.    ~~FNext frame~~Pf+~~K ~~E
  1333.  
  1334. will have 'Next frame' highlighted as a frame reference, and will
  1335. move to the next frame when selected directly or when the space bar
  1336. is depressed.
  1337. .
  1338. .FRAME Immediate reference
  1339. .TITLE Flag ~~Q
  1340. One reference on a frame or note display may be flagged as an
  1341. 'immediate' reference, which will be selected automatically after
  1342. the frame or note text has been displayed. This is done by including
  1343. the sequence ~~Q after the complete reference sequence for the
  1344. reference to be selected. This may be used for many purposes, but the
  1345. most common would be to select the first input field on a form frame,
  1346. and therefore put the frame into a data input mode automatically on
  1347. entry.
  1348.  
  1349. The immediate reference flag may also be used with an 'invisible'
  1350. reference. This has a zero length reference string and does not
  1351. therefore permit manual selection. This could be placed in the header
  1352. or footer to, for instance, write a log file of frames visited. It can
  1353. also be used to pop up a note or a menu on moving to a frame. It may
  1354. even invoke a script which could perform a long sequence of actions.
  1355.  
  1356.     ~~A~~PNhello~~E~~Q
  1357. .
  1358. .FRAME Formatting
  1359. .TITLE Format control flags
  1360. The formatting sequences permit the frame, and note, displays to be
  1361. controlled in a number of ways. Absolute cursor positioning and
  1362. colour control are the main uses for this feature.
  1363.  
  1364. Formatting sequences can be placed within the reference text,
  1365. provided that a parameter section is provided for that reference.
  1366. This facility can be used to highlight a letter in the reference,
  1367. if that letter key is mapped to the reference.
  1368. .
  1369. .FRAME Option display
  1370. .TITLE Flag ~~O
  1371. The option display is an extended form of variable display. It
  1372. allows the state of various runtime options to be displayed as
  1373. either 'ON' or 'OFF'. The runtime options are as follows, showing
  1374. the option code, the command line flag and the option description
  1375. with the default state which is toggled by the flag.
  1376.  
  1377.    ~~O2           displays ON or OFF depending on backtrack status
  1378.  
  1379. It is possible to access options in the extended option set using
  1380. the following characters:-
  1381.  
  1382. O*0':' O*1';' O*2'<' O*3'=' O*4'>' O*5'?' O*6'@' O*7'A' O*8'B' O*9'C'
  1383.  
  1384. The special form ~~O# displays a three character field containing
  1385. current page number of a multi screen frame. This can be used with
  1386. ~Flocal flag~PFlocal flags~E '<' to show a conditional footer with the page number.
  1387. .
  1388. .FRAME Line positioning
  1389. .TITLE Flag ~~L
  1390. ~~Lnn
  1391.  
  1392. The line positioning command, introduced by the ~~L sequence,
  1393. positions the text writing cursor at the default indent of the
  1394. specified line, unless that line is before or at the current line,
  1395. or beyond the bottom of the display or footer margin. The full
  1396. form of the sequence is either ~~Ln or ~~Lnn, where n/nn is the
  1397. line number, starting from 1. Thus:-
  1398.  
  1399.    ~~L3          positions at line 3, column 1
  1400.  
  1401.    ~~L20         positions at line 20, column 1
  1402. .
  1403. .FRAME Column positioning
  1404. .TITLE Flag ~~C
  1405. ~~Cnn
  1406.  
  1407. The column positioning command, introduced by the ~~C sequence,
  1408. positions the text writing cursor at the specified column, by
  1409. outputting spaces, unless that column is before or at the current
  1410. position, or beyond the edge of the display. The full form of the
  1411. sequence is either ~~Cn or ~~Cnn, where n/nn is the column number,
  1412. starting from 1. Thus:-
  1413.  
  1414.    ~~C9           positions at column 9
  1415.  
  1416.    ~~C74          positions at column 74
  1417. .
  1418. .FRAME Width positioning
  1419. .TITLE Flag ~~W
  1420. ~~Wnn
  1421.  
  1422. The ~~W sequence, of the form ~~Wn or ~~Wnn, outputs spaces to
  1423. the display upto the specified number of column positions from
  1424. the start of the last reference, or the start of the line if no
  1425. references yet displayed.
  1426.  
  1427. This is normally used to specify the width of an ~Finput field~E.
  1428. It may, however, be used for other purposes.
  1429.  
  1430.     ~~W12         positions 12 columns from start of reference
  1431. .
  1432. .FRAME Force column position
  1433. .TITLE Flag ~~X
  1434. ~~Xnn
  1435.  
  1436. The force column position flag, introduced by the ~~X sequence,
  1437. positions the text writing cursor at the specified column of the
  1438. current line, regardless of the current position. The full form
  1439. of the sequence is either ~~Xn or ~~Xnn, where n/nn is the column
  1440. number, starting from 1. Thus ~~X34 positions at column 34.
  1441. This flag is usually used in the ~FInsert text~E action.
  1442.  
  1443. The position set by the ~~X flag can be used to start a width
  1444. range, so that the ~~W flag may be used to clear part of a line.
  1445.  
  1446. CAUTION: this flag should be used with care
  1447. .
  1448. .FRAME Force line position
  1449. .TITLE Flag ~~Y
  1450. ~~Ynn
  1451.  
  1452. The force line position flag, introduced by the ~~Y sequence,
  1453. positions the text writing cursor at the current column of the
  1454. specified line, regardless of the current line position. The full
  1455. form of the sequence is either ~~Yn or ~~Ynn, where n/nn is the
  1456. line number, starting from 1. Thus ~~Y10 positions at line 10.
  1457. This flag is usually used in the ~FInsert text~E action.
  1458.  
  1459. CAUTION: this flag should be used with care
  1460. .
  1461. .FRAME Screen break
  1462. .TITLE Flag ~~G
  1463. In the frame text, a 'new page' (or second screen) of text may be
  1464. forced after the current line by the inclusion of the screen break
  1465. trigger. The form of this sequence is ~~G, and this may occur at
  1466. any point in the line, although it is probably easiest to maintain
  1467. if placed at the end of the line.
  1468.  
  1469.       . . . . line at end of screen 1 ~~G
  1470.     Line at start of screen 2 . . . .
  1471. .
  1472. .FRAME Line break
  1473. .TITLE Flag ~~g
  1474. In frame or note text, a new line can be started by embedding this
  1475. flag in the text.
  1476.  
  1477. This is used where ~Fnamed variables~E hold text to be displayed
  1478. which occupies more than one line.
  1479.  
  1480.     This line~~gNext line
  1481. .
  1482. .FRAME Concatenate text
  1483. .TITLE Flag ~~c
  1484. ~~c
  1485.  
  1486. The ~~c flag may be placed at the end of a line, if the next line
  1487. is to be concatenated. This flag has special applications and should
  1488. not be used in open frame or note text. It is usually used with the
  1489. 'i' action to retain the text position after writing to the screen.
  1490.  
  1491. CAUTION: This flag should be used with care
  1492. .
  1493. .FRAME Hidden lines
  1494. .TITLE Flag ~~H
  1495. ~~Hc
  1496.  
  1497. Lines in the text can be excluded from a frame or other display by
  1498. putting a ~~H sequence at the start of the line. If the ~~H flag
  1499. appears after the first column, it marks the start of a hidden area
  1500. which finishes at the end of the line or at a ~~Z flag. The ~~H flag
  1501. can be used for embedding maintenance comments in frame text, which
  1502. will not be displayed.
  1503.  
  1504. ~X1See also: ~FConditional hidden lines~E
  1505. .
  1506. .FRAME Conditional hidden lines
  1507. .TITLE Flags ~~h and ~~j
  1508. ~~hc       - display text if condition c is TRUE
  1509. ~~jc       - display text if condition c is FALSE
  1510.  
  1511. These sequences provide a conditional hidden text capability.
  1512. The 'c' character is one of the general HyperShell ~Fconditions~E.
  1513. When the condition is FALSE, the ~~hc sequence acts as ~~H to hide a
  1514. complete line or part of a line terminated by ~~Z. When the condition
  1515. is TRUE, the sequence has no effect, permitting the text to be
  1516. displayed. The ~~jc sequence has the opposite effect, whereby if the
  1517. condition is TRUE the text is hidden, else it is displayed.
  1518.  
  1519. The conditional hidden text flags are generally used for information
  1520. which is ~Fexpanded 'in line'~PFlocal flag toggle~E with the main text. The frame
  1521. ~Flocal flags~E 0 to 9 are usually used for this purpose.
  1522.  
  1523. ~X1See also: ~FHidden lines~E
  1524. .
  1525. .FRAME Print suppress lines
  1526. .TITLE Flag ~~p
  1527. ~~p
  1528.  
  1529. Lines in the text which are only required for online display can be
  1530. excluded from printout when using the HP program by putting a ~~p
  1531. sequence at the start of the line. If the ~~p flag appears after the
  1532. first column, the rest of the line is not printed.
  1533. .
  1534. .FRAME Flag setting
  1535. .TITLE Flag ~~J
  1536. ~~Jn
  1537.  
  1538. The local flags 0 to 9 can be set using the ~~J flag. The sequence
  1539. sets the local flag 'n' IMMEDIATELY it is encountered. This is
  1540. used for setting the local flags to influence the frame display
  1541. or operation in some way, mainly for conditional text in the
  1542. footer section of the display, where the conditional hidden line
  1543. flag is used.
  1544.  
  1545.    ~~J3            - sets frame local flag 3
  1546.  
  1547. ~X1See Also:     ~FHidden lines~E
  1548. .
  1549. .FRAME End of hidden range
  1550. .TITLE Flag ~~Z
  1551. The ~~Z flag is used to terminate the range of a hidden or
  1552. conditionally hidden piece of text in a frame or note.
  1553.  
  1554.     start of line ~~h2Hidden text~~Z
  1555.  
  1556. ~X1See Also:     ~FHidden lines~E
  1557. .
  1558. .FRAME Text/Background colours
  1559. .TITLE Flags ~~T and ~~B
  1560. ~~Tc
  1561. ~~Bc
  1562.  
  1563. These sequences set the text colour or background colour to the
  1564. colour with code 'c'. The text can have one of 16 different
  1565. 'colours' and the background can have one of 8. It is helpful to
  1566. choose these so that they have a good contrast. And yes, if you
  1567. make them both the same, the text is invisible.
  1568.  
  1569.    ~~Tr             - set text bright red
  1570.    ~~BM             - set background magenta
  1571.  
  1572. ~X1See also:     ~FColour codes~E
  1573. .
  1574. .FRAME Display colour schemes
  1575. .TITLE Flag ~~D
  1576. ~~Ds
  1577.  
  1578. The ~~D sequence selects colour highlighting scheme 's'. There are
  1579. 26 colour schemes, mapped to the letters A to Z. The scheme letter
  1580. is specified directly after the ~~D. The colour scheme sequence
  1581. works slightly differently to the text/background settings in that
  1582. it is held over a reference display.
  1583.  
  1584. The schemes are configurable using the option setting action 'O'.
  1585.  
  1586.      ~~DM             - use menu reference colour scheme
  1587.  
  1588. ~X1See also:     ~FColour schemes~E
  1589. .
  1590. .FRAME Indent flag
  1591. .TITLE Flag ~~i
  1592. ~~in
  1593.  
  1594. The indent flag can be used to cause an indent to be added
  1595. automatically to the text in a frame display. The parameter 'n'
  1596. is a digit from 0 to 9 indicating the indent to be applied.
  1597. A value of 0 causes no indent.
  1598.  
  1599.     ~~i5             - indent the text by 5 places
  1600.  
  1601. The flag is usually placed at the end of the header to cause the
  1602. frame body text to be indented, and possibly at the start of the
  1603. footer to reset the indent before the footer.
  1604.  
  1605. Indivual lines can be reset to column 1 by prefixing them with
  1606. the sequence '~~X1'. Ranges of lines can have the indent changed
  1607. before the start and after the end.
  1608. .
  1609. .FRAME Box start
  1610. .TITLE Flag ~~a
  1611. ~~a
  1612.  
  1613. This flag indicates the TOP LEFT position of a graphic box.
  1614.  
  1615. ~X1See also: ~FBox draw~E
  1616. .
  1617. .FRAME Box draw
  1618. .TITLE Flag ~~b
  1619. ~~bt
  1620.  
  1621. This flag indicates the BOTTOM RIGHT of a box area, and causes
  1622. the area to be drawn from the top left position indicated by a
  1623. ~FBox start~E flag. The 't' parameter indicates the type of
  1624. area, as follows:-
  1625.  
  1626.     ~~b0    -- just return to position of ~~a flag
  1627.     ~~b1    -- draw a double edged box
  1628.     ~~b2    -- define a window and clear it
  1629.     ~~b3    -- draw a box, then define a window within it
  1630.     ~~b4    -- define window as full screen    (used by itself)
  1631.     ~~b6    -- clear the area without defining a window
  1632.     ~~b7    -- draw box and clear inside without defining window
  1633.  
  1634. Most of these specify window areas and are for use with the 'i' action.
  1635. Only the ~~b1 version should be used in frame displays generally.
  1636.  
  1637. CAUTION: This flag should be used with care
  1638. ~G
  1639. Example boxes
  1640.  
  1641.   ~~a                ~a
  1642.       This is in a box        --     This is in a box
  1643.                         ~~b1                ~b1
  1644.  
  1645.   ~~a                ~a
  1646.  
  1647.                ~~DJ~~b3                        ~DJ~b3
  1648. ~a Text in a box window~b4
  1649. ~Y18
  1650.  
  1651. ~DTThis feature can also be used for 'subwindows' or panelled windows,
  1652. along with the ~FTake copy of screen~E and ~FShow saved screen~E actions.
  1653.  
  1654. ~X1See also: ~FBox start~E
  1655. .
  1656. .FRAME Wait in display
  1657. .TITLE Flag ~~w
  1658. ~~ws
  1659.  
  1660. The ~~w flag causes a delay of 's' seconds before proceeding with
  1661. the display. This is used for effect.
  1662.  
  1663.     1~w12~w13
  1664.  
  1665. ~X1See also: ~FTeletype mode~E
  1666. .
  1667. .FRAME Teletype mode
  1668. .TITLE Flag ~~d
  1669. ~~d
  1670.  
  1671. The ~~d flag causes text to be slowly displayed as though by
  1672. an old fashioned teletype. The flag acts as a toggle, and is
  1673. valid for the current line only.
  1674.  
  1675. It is used for special effects, and is useful to focus attention
  1676. on the text.
  1677.  
  1678.   Type this ~dslowly at first~d and then fast
  1679.  
  1680. ~X1See also: ~FWait in display~E
  1681. .
  1682. .FRAME Flag character display
  1683. .TITLE To actually display a ~~
  1684. The ~~ character can be displayed in a frame, note or paged list
  1685. by coding it as two ~~ signs:-
  1686.  
  1687. ~~~~
  1688. .
  1689. .FRAME Graphic reference
  1690. .TITLE Flag ~~R [G]
  1691. Within frame or note text, the following constructs are used. The first
  1692. is used to execute a sublanguage command immediately. The second does
  1693. the same, but is also used to define a selectable graphic reference.
  1694.  
  1695. ~~Rcommands^item~~E          execute sublanguage 'commands^item'
  1696.  
  1697. ~~Rcommands^item~~Paction~~E  same as above, also define a reference
  1698.  
  1699. Example: Show graphic of mouse and display note if selected
  1700.  
  1701.     ~~RLTP^MOUSE.HGP~~PNAbout mice~~E
  1702.  
  1703. Show graphic of car, but do not define a selectable reference:-
  1704.  
  1705.     ~~RLTP^CAR.HGP~~E
  1706.  
  1707. Note that the 'ZZ' prefix MUST NOT be added to the sublanguage commands
  1708. string when it is used in frame or note text in this fashion, otherwise
  1709. it will be interpreted as two wait commands.
  1710.  
  1711. The ~~R and ~~E sequences work differently to the text reference
  1712. equivalents. For the immediate display option, the ~~E will only suppress
  1713. the creation of a reference if a ~~P, ~~K or other flag is not encountered
  1714. after the sublanguage statement.
  1715. .FRAME Terminate sublanguage command
  1716. .TITLE Flag ~~z [G]
  1717. The ~~z flag may be used in certain kinds of graphic references
  1718. to terminate an image name and start an action mapping. Eg.
  1719.  
  1720.     ~~N~~PLTP^NOTE.HGP~~zNA note~~E
  1721.  
  1722. It is preferable to use the ~~R format in most cases.
  1723.  
  1724. See also: ~FGraphic reference~E
  1725. .FRAME Terminate image for display only
  1726. .TITLE Flag ~~e [G]
  1727.  
  1728. A ~~e sequence may be used in place of the ~~E where the graphic
  1729. display should not be treated as a reference, even if an introductory
  1730. flag other than ~~R is used or a ~~P sequence has been coded.
  1731.  
  1732. .FRAME Depth of reference
  1733. .TITLE Flag ~~y [G]
  1734.  
  1735. The graphic image selection is implemented by adding a 'depth' to
  1736. the reference, which is loaded with the depth of the displayed image.
  1737. The depth can be added to a normal text reference by coding the
  1738. sequence ~~ynn where nn is the depth in character cells (default
  1739. is 1 for normal references). This may also be used after the ~~P
  1740. of a graphic reference to adjust the selectable depth of the image.
  1741. .FRAME Select font
  1742. .TITLE Flag ~~v [G]
  1743. Format:   ~~vx
  1744.  
  1745. The ~~v flag introduces a font change:-
  1746.  
  1747.    ~~vX   where X is A to Z to represent banks 1 to 26
  1748.          A value for X of @ represents the base bank
  1749.  
  1750.    The bank is added to the base font number eg. 
  1751.  
  1752.    ~~vA   sets font 1 as follows:-
  1753.          chr001.udg if base is chr000.udg
  1754.          chr101.udg if base is chr100.udg
  1755.          chr201.udg if base is chr200.udg
  1756.  
  1757.     eg. this is base font ~~vBthis is font 2~~v@ this is base font
  1758.  
  1759. This permits the font selection to be independant of the adaptor.
  1760. .FRAME Do bitmap command
  1761. .TITLE Flag ~~U [G]
  1762. Format:   ~~Ux
  1763.  
  1764. This flag is for embedding font loads etc. into text:-
  1765.  
  1766. ~~Ux    - Pass contents of variable GUx to sublanguage processor
  1767.  
  1768. eg.   ZVGUR=DF^ROMAN.UDG       - set up variable to load font
  1769.                                  from compressed variable
  1770.               ~~UR              - trigger new font
  1771.  
  1772. This can also be used instead of ~~Rxxxxx~~E to do graphic block
  1773. displays etc.
  1774. .FRAME Do draw command
  1775. .TITLE Flag ~~u [G]
  1776. Format:   ~~ux
  1777.  
  1778. This flag processes the contents of variable Gux through the
  1779. drawing sublanguage, immediately it is encountered in the text.
  1780. This is used to permit common sequences to be coded in one place
  1781. and invoked as required. The character 'x' can be any alphabetic
  1782. or numeric character, or certain other characters, provided they
  1783. do not conflict with the variable definition or the display
  1784. interpretation.
  1785.  
  1786. eg. store commands to draw a white line 47 pixels long, to the right
  1787.  
  1788.     ZVGu3=L647w
  1789.  
  1790. Invoke commands stored in variable Gu3
  1791.  
  1792.     ~~u3
  1793. .PRINT SECTION 4.
  1794. .
  1795. .PRINT TITLE Flag ~~
  1796. Reference Guide - Actions
  1797. .
  1798. .PRINT PAGE
  1799. .
  1800. .FRAME Actions
  1801. .TITLE Section - HyperShell control commands
  1802. Actions are the commands which control HyperShell.
  1803. Action specifications, including ~Fmultiple actions~E can be
  1804. supplied at a number of different places:-
  1805.  
  1806.    1. The reference action in the text.
  1807.    2. A menu action.
  1808.    3. A script action.
  1809.  
  1810. Not all forms of action specification are relevant in all places.
  1811. It is normally obvious where a particular type of action modifier
  1812. string is not applicable, or where a particular action is not
  1813. sensible. In particular, control flow actions are only relevant in
  1814. scripts (although a popup note or menu may cause a branch within a
  1815. currently executing script).
  1816. .
  1817. .FRAME Multiple actions
  1818. .TITLE A string of actions
  1819. Multiple action strings can exist in any action specification.
  1820. The actions are separated by ';' characters. Multiple actions
  1821. are permitted wherever an action specification is expected.
  1822.  
  1823.   ZX40;ZY12 - Positions the cursor in the middle of the screen.
  1824.  
  1825. The following rules apply to multiple action strings:-
  1826.  
  1827. 1. The condition of a ~Fconditional action~E affects remaining
  1828.    actions.
  1829. 2. A conditional ~Fjump within script~E does not clear remaining
  1830.    actions.
  1831. 3. The remaining actions are cleared if an error occurs in an
  1832.    action, or an input is cancelled.
  1833. 4. If a further multiple action is encountered, for instance as
  1834.    the result of an action modifier or menu selection, the
  1835.    remaining actions are cleared in the original. 
  1836. .
  1837. .FRAME Action codes
  1838. .TITLE Command letters
  1839. Action specifications start with a single letter action code, or
  1840. a double letter ~Fextended action code~PFExtended action codes~E (starting with Z).
  1841.  
  1842. An action may also have parameters supplied directly after the
  1843. code. The parameters may be supplied directly as literal strings
  1844. or indirectly via one of a number of ~Faction modifiers~PFAction Modifier functions~E.
  1845. .
  1846. .FRAME Perform action
  1847. .TITLE Action 'A'
  1848. ~X1Format:   Aactionspec
  1849.  
  1850. The 'A' action is provided to enable action modifiers returning full
  1851. action specifications to be serviced. For example the extended
  1852. directory listing modifier 'l' and the notepad listing modifier 'R'
  1853. both return action strings, and would be handled as follows:-
  1854.  
  1855.    A@l*.*
  1856.  
  1857.    A@R
  1858.  
  1859. Also the form 'A?Enter action' can be used to permit the user to
  1860. enter an action specification for execution.
  1861. .
  1862. .FRAME Conditional action
  1863. .TITLE Action 'a'
  1864. ~X1Format:   acxxxxxxx{;actionstring}{;actionstring}...
  1865.  
  1866. The 'a' action is used to execute an action or set of actions
  1867. conditionally on the setting of the condition 'c' specified.
  1868.  
  1869. This action provides a means of specifying conditional actions
  1870. without having to use scripts.
  1871.  
  1872. The condition letters are described in the ~Fconditions~E section.
  1873.  
  1874.   adpvariable not defined   - displays message if variable not set
  1875.  
  1876. ~X1See also:       ~FUnless condition~E
  1877. .
  1878. .FRAME Backtrack one step
  1879. .TITLE Action 'B'
  1880. ~X1Format:   B
  1881.  
  1882. HyperShell retains a list of frames that the user has displayed.
  1883. This list acts like a 'stack' which has a frame reference 'pushed'
  1884. when a new frame is displayed. The 'B' action 'pops' the frame
  1885. references from this stack one at a time, displaying the frame
  1886. referenced.
  1887.  
  1888. ~X1See also:       ~FMultiple backtrack~E
  1889. .
  1890. .FRAME Multiple backtrack
  1891. .TITLE Action 'b'
  1892. ~X1Format:   b{depth}
  1893.  
  1894. The 'b' action permits a number of frames to be discarded from
  1895. the backtrack list, retaining the depth specified as a numeric
  1896. parameter, where 0 represent the first frame visited in the file.
  1897. After this it displays the frame referenced at that point. This
  1898. action is usually used with the 'B' dynamic menu, to permit the
  1899. point in the list to be selected. If a frame from the backtrack
  1900. is to be revisited without winding back, the 'b' dynamic menu
  1901. should be used with the A action.
  1902.  
  1903.    b@B             Select level and unwind
  1904.  
  1905.    b3              Unwind to level of 3
  1906.  
  1907. ~X1See also:    ~FSelect backtrack~E
  1908. .
  1909. .FRAME Change drive / directory
  1910. .TITLE Action 'C'
  1911. ~X1Format:   C{Wd:}{pathname}
  1912.  
  1913. The 'C' action allows the working directory to be changed, and
  1914. optionally allows the working drive to be altered. For example:-
  1915.  
  1916.    CB:\HYPER
  1917.  
  1918.    CSUBDIR
  1919.  
  1920.    C..\HYPER2
  1921.  
  1922. The original drive:directory is held in system variable 8, and the
  1923. current drive:directory is held in system variable 7. Thus the
  1924. action 'P$$7' would display the current working drive:directory,
  1925. and the action 'C$$8' changes back to the original directory.
  1926. .
  1927. .FRAME Call script file
  1928. .TITLE Action 'c'
  1929. ~X1Format:   cscriptfile
  1930.  
  1931. The 'c' action permits a file containing a script to be executed.
  1932. The 'scriptfile' parameter may have its extension omitted, in which
  1933. case .HSF is assumed. Script files are treated as normal ~Fscripts~E,
  1934. and obey the same rules. A file script cannot be appended to a
  1935. script, but can append normal scripts itself.
  1936.  
  1937. Script files can be used as small 'programs'.
  1938.  
  1939. ~FParameters~E can be supplied on a script action.
  1940.  
  1941.    creload             - runs the script file RELOAD.HSF
  1942.  
  1943. ~X1See also        ~FExecute script~E
  1944. .
  1945. .FRAME DOS command execution
  1946. .TITLE Action 'D' and 'd'
  1947. ~X1Format:   D{ }{Command line}
  1948.      d{ }{Command line}
  1949.  
  1950. This action starts the DOS command processor to run a command or to
  1951. permit command line interaction. If a parameter is supplied, it is
  1952. issued as a command line to DOS. The command can be a DOS built-in
  1953. command, a batch file, or an external program. The command can have
  1954. parameters.
  1955.  
  1956. If the action is specified without parameters, it runs the command
  1957. line interpreter to allow the user to interact with DOS. When the
  1958. user has finished, the EXIT command is used to return to
  1959. HyperShell.
  1960.  
  1961. The uppercase form of the action indicates that when the command
  1962. has finished, a key press is required before redisplaying the
  1963. current HyperShell frame again. The lowercase form indicates that
  1964. when the command has finished, HyperShell will immediately
  1965. redisplay the current frame. The system variable '^' is set to the
  1966. exit code of the DOS command processor (this is always 0!).
  1967.  
  1968. If the command line contains a space character as the first
  1969. character, the screen is not cleared before invocation or refreshed
  1970. afterwards, allowing 'silent' commands, or commands with redirected
  1971. output to be executed without disturbing the display. If the command
  1972. does output to the screen, the display will be disturbed, but can be
  1973. refreshed using the 'y' action. It is preferable to ensure that the
  1974. command will never output to the screen. ~FOption~PFOptions~E O6 can be set so
  1975. that the HyperShell program is saved to disk whilst a command runs
  1976. (this is only possible with the HS.EXE program). Examples:-
  1977.  
  1978.    D        - escape to command line allowing return
  1979.  
  1980.    DDIR/W *.HYP    - Do wide directory listing of hyperfiles
  1981.  
  1982.    d DEL DATA.DAT    - Silently delete a file
  1983.  
  1984. ~X1See also:       ~FExecute program~E
  1985. .
  1986. .FRAME Command chaining
  1987. .TITLE Action 'E'
  1988. ~X1Format:   ECommand line
  1989.  
  1990. The 'E' action executes another program, overwriting HyperShell in
  1991. memory. Only programs (files with .EXE or .COM as an extension)
  1992. can be executed using this action. If subsequent return to
  1993. HyperShell is required, either the 'D' action or the 'X' action
  1994. should be used, although these will mean that the program has less
  1995. room in which to execute, as HyperShell occupies around 120k of
  1996. memory.
  1997.  
  1998.    Edbase                - chains the dbase program
  1999.  
  2000. ~X1See also:       ~FDOS command execution~E, ~FExecute program~E
  2001. .
  2002. .FRAME Expand, or split, variable
  2003. .TITLE Action 'e'
  2004. ~X1Format:   evsabc...
  2005.  
  2006. The 'e' action allows a variable to be split into fields, and
  2007. assigned to a number of other variables. Parameter 'v' is the name
  2008. of the source variable, 's' is a character used to separate the
  2009. fields in the source variable, and abc... are the target variables
  2010. to receive the fields. If the character 's' is ommitted, the
  2011. fields are assumed to be separated by spaces. There is a list
  2012. of ~Freserved characters~E which cannot be used as separators.
  2013.  
  2014.     ex:abcd           - splits 'x' on ':' into a,b,c and d
  2015.  
  2016. If 'x' contained 'one:two:three:four' then 'a' would become 'one',
  2017. 'b' would become 'two' etc.
  2018. ~G
  2019. The opposite effect to the expand action is to pack the values of
  2020. a number of variables in a variable, with a separator between
  2021. them. This can easily be accomplished by the form:-
  2022.  
  2023.    Vv$$as$$bs$$c
  2024.  
  2025. Where the values of v,s,a,b,c are as above. This mechanism can be
  2026. used to pack a set of variables for storage whilst the variable
  2027. names are used for some other purpose. Of course the variable can
  2028. be expanded into a set of variables other than the original.
  2029. .
  2030. .FRAME Frame selection
  2031. .TITLE Action 'F' and 'f'
  2032. ~X1Format:   Fframename{^{hyperfile}}
  2033.      fframename{^{hyperfile}}
  2034.  
  2035. The 'F' and 'f' actions select a new frame to display.
  2036.  
  2037. The parameter specifies the frame name of the frame to be
  2038. displayed. If just a frame name is supplied, the frame is assumed
  2039. to be in the local hyperfile. If the hyperfile parameter is used,
  2040. this indicates that the frame belongs to the specified hyperfile.
  2041. If the '^' character is present without a hyperfile, the primary
  2042. hyperfile (that named on the command line) is assumed.
  2043. The home frame of a hyperfile can be selected with the form:-
  2044.  
  2045.    F^hyperfilename
  2046.  
  2047. The home frame of the current hyperfile is selected with the form
  2048.  
  2049.    F
  2050. ~G
  2051. The lowercase form of the action modifies the backtrack processing
  2052. so that the frame replaces the last frame reference on the
  2053. backtrack list, rather than being added to the list. This is used
  2054. to step through related frames when it is clear that the user is
  2055. reading them through, and where it is not necessary to stack the
  2056. frames on the backtrack list. Also, whilst the uppercase form
  2057. causes a currently executing script to be cleared, the lowercase
  2058. form does not. The example shows an action which will step to the
  2059. next frame in the hyperfile, without retaining the previous frame
  2060. reference.
  2061.  
  2062.    f+
  2063.  
  2064. The '+' modifier is only applicable to the 'F' or 'f' action.
  2065. An extended form of the '+' modifier allows selection of the
  2066. next matching or unmatched frame:-
  2067.  
  2068.   F+1     -  next matching frame
  2069.   F+2     -  next unmatched frame
  2070.  
  2071. If you have chosen to have duplicate frame names in your
  2072. hyperfile, the special form:-
  2073.  
  2074.    F+frame name
  2075.  
  2076. can be used. This looks for the frame from the current frame
  2077. onwards. It can therefore be used in the action string of a
  2078. reference in a frame to look for the next occurrence of the
  2079. frame name after that frame - for when the hyperfile is split
  2080. into sections, or can be used to step through all frames of a
  2081. particular name by using 'Fframe name' for the first and
  2082. 'F+frame name' for the rest.
  2083.  
  2084. The '-' modifier is used to step to the previous frame in the
  2085. hyperfile, and to 'wrap' to the last frame from the first.
  2086.  
  2087.     F-
  2088. .
  2089. .FRAME Graphic screen display
  2090. .TITLE Action 'G' and 'g'
  2091. ~X1Format:   Gfilename
  2092.      g{filename}
  2093.  
  2094. The 'G' and 'g' actions display a graphic or text screen from a
  2095. file in BLOAD format. The 'g' variant does not reset the screen
  2096. mode after display, so that graphic screens can be displayed one
  2097. after the other with no lack of continuity. The 'g' action with
  2098. no parameter resets the display mode to the default text mode,
  2099. which otherwise takes place the next time the frame display is
  2100. refreshed.
  2101.  
  2102. The formats of display supported are listed in the component
  2103. operation guide. BLOAD images, tagged BLOAD images and .PCX
  2104. images of various forms are supported.
  2105. ~G
  2106. The file type is auto-sensed. The correct adaptor type is assumed
  2107. to exist and is not tested, apart from text mode screens, where the
  2108. correct screen address is used for the adaptor type.
  2109.  
  2110. After display the mouse may be used to select a zone on the screen,
  2111. or a character may be pressed to choose an option if no mouse is
  2112. available. The character and zone mappings are defined in a special
  2113. form of MENU, and selected using the ~Fzone selection~E method.
  2114.  
  2115. The palette information is ignored if the filename ends in '-'. eg.
  2116.  
  2117.          Gwithpal.pcx-
  2118.  
  2119. will display the file withpal.pcx, which has palette information,
  2120. without the palette information being interpreted. Note that
  2121. version 5 corrects a bug in the interpretation of the palette
  2122. information when this is utilised.
  2123. .
  2124. .FRAME Notepad maintenance
  2125. .TITLE Action 'H' and 'h'
  2126. ~X1Format:   H{string}
  2127.      h{string}
  2128.  
  2129. The notepad, as well as being maintained by the INS and DEL keys,
  2130. may also have data added and removed by the 'H' and 'h' actions.
  2131. The items on the notepad would normally be action specifications,
  2132. although it is possible to store other data on the list for
  2133. selection for other purposes. These actions cause the notepad scan
  2134. pointer (used by !R) to be reset.
  2135.  
  2136. The 'H' action by default requests a comment string which is
  2137. associated with the reference when it is listed. This can be
  2138. suppressed using the ~FO*8 option~PFextended options~E flag.
  2139.  
  2140.      HFframe two       - adds frame reference for 'frame two'
  2141.  
  2142.      hNHelp            - removes all note references for 'Help'
  2143. .
  2144. .FRAME Select next input field
  2145. .TITLE Action 'I'
  2146. ~X1Format:   I
  2147.          Ix
  2148.  
  2149. The 'I' action is specific to frames containing input fields. This
  2150. action is used in an input field action string to select the next
  2151. input field after input is complete on that input field.
  2152.  
  2153. If a parameter is supplied as in the second format above, the
  2154. CURRENT input field is reselected. This is used where an input
  2155. field is validated in a script, and has to be re-entered if in
  2156. error.
  2157.  
  2158. ~X1See also: ~FInput field~E 
  2159. .
  2160. .FRAME Insert text
  2161. .TITLE Action 'i'
  2162. ~X1Format:   istring
  2163.  
  2164. The 'i' action is used to insert text in the current frame display.
  2165. The string can contain formatting flags, but must not contain any
  2166. reference flags. It is usual to start with ~~X and ~~Y flags to
  2167. position the text cursor for writing the string.
  2168.  
  2169. This action can be used to update information on the screen
  2170. without redisplaying the whole frame text.
  2171.  
  2172.     Y&H;i~~Y1~~X60$$5~~L25
  2173.  
  2174. will update the time displayed at line 1 column 60 and re-park
  2175. the text cursor.
  2176.  
  2177. This action should be used with care, as it is easy to corrupt
  2178. the screen display if used incorrectly.
  2179. .
  2180. .FRAME Jump within script
  2181. .TITLE Action 'J' and 'j'
  2182. ~X1Format:   Jlabel
  2183.      jclabel
  2184.  
  2185. The uppercase form 'J' is an unconditional branch, and transfers
  2186. control to the script ~Flabel~PFLabel in script~E denoted by the parameter.
  2187.  
  2188.    Jstart
  2189.  
  2190. Branches to the line containing 'Lstart' in the script. If the
  2191. label does not exist in the script, the jump does not take place,
  2192. and processing continues with the next line in the script.
  2193.  
  2194. The lowercase form 'j' is a conditional jump, and is followed by
  2195. a letter denoting the condition upon which a jump will occur,
  2196. followed by the label to which a branch will be made if the
  2197. condition is set. See ~Fconditions~E.
  2198. .
  2199. .FRAME Set key mapping
  2200. .TITLE Action 'K'
  2201. ~X1Format:   Kksactionstring
  2202.  
  2203. The 'K' action maps a keyboard key to an action string. This
  2204. action is then available from a frame display (not from paged
  2205. displays). When the key is pressed, the action is performed.
  2206.  
  2207. Function keys and printable ascii characters may be mapped
  2208. (subject to them not conflicting with HyperShell metacharacters).
  2209. The key to be mapped is specified by the following notations:-
  2210.  
  2211.    K#xstring       Character x
  2212.    KFnstring       Function key n
  2213.    KSnstring       Shift/function key n
  2214.    KCnstring       Ctrl/function key n
  2215.    KAnstring       Alt/function key n
  2216.  
  2217. Function key 10 is indicated by n = 0.
  2218. ~G
  2219. ~X1Example:
  2220.  
  2221.     K#hNHelp      - map 'h' key to global note 'Help'
  2222.  
  2223.     KF1F^HOME     - Map F1 key to move to HOME hyperfile
  2224.  
  2225. Unshifted function keys equate to the main control menu actions,
  2226. and mapping them changes the actions for the main menu. This can
  2227. be used to disable certain control menu options. The option text
  2228. for the main menu can be set using the special form:-
  2229.  
  2230.     KMnstring      - set menu option text n to string
  2231. ~G
  2232. The K action is also used for mapping strings and actions to
  2233. certain ~Fheadings and control keys~PFControl key mapping~E, using the form
  2234.  
  2235.     KHnmapping     or     KGnmapping
  2236.  
  2237. ~X1Example:
  2238.  
  2239.     KH4Q          - map ESCape to action 'Q' to quit HyperShell
  2240.  
  2241. The complete set of key and heading mappings can be reset at any
  2242. time by the special option action
  2243.  
  2244.     O#
  2245.  
  2246. This is useful for inclusion at the start of the SETUP script in a
  2247. hyperfile, to avoid confusing key mappings being inherited when a
  2248. hyperfile is referenced from another.
  2249.  
  2250. ~X1See also: ~FDo mapped key~E
  2251. .
  2252. .FRAME Do mapped key
  2253. .TITLE Action 'k'
  2254. ~X1Format:   kks
  2255.  
  2256. The 'k' action takes a key specification as for action K and
  2257. performs the action mapped to the key specified.
  2258.  
  2259. This action is used where an action is both mapped to a key and
  2260. tied to a reference or a menu selection.
  2261.  
  2262.      kF1           - do action mapped to Function key 1
  2263.  
  2264.      k#h           - do action mapped to 'h' key
  2265.  
  2266. ~X1See also: ~FSet key mapping~E
  2267. .
  2268. .FRAME Label in script
  2269. .TITLE Action 'L'
  2270. ~X1Format:   Llabelname
  2271.  
  2272. The 'L' action does not do any processing, but indicates a line in
  2273. a script to which jump actions can branch. The 'labelname' is the
  2274. name used as the target of a ~Fjump statement~PFjump within script~E.
  2275.  
  2276.     Lrepeat         - label 'repeat'
  2277.  
  2278. One of the traditional problems with programming is the endless
  2279. loop. To help diagnose this sort of problem, a trace can be
  2280. performed by setting ~Foption flag 7~PFoptions~E. If this is set, the script
  2281. stops at each label it executes, showing the label name.
  2282.  
  2283.     O71 
  2284.  
  2285. If tracing is not enabled, pressing the ESCape key will stop and
  2286. display the label. Any key will resume the script, or pressing ESCape
  2287. again will stop the script.
  2288. .
  2289. .FRAME Load named variable
  2290. .TITLE Action 'l'
  2291. ~X1Format:   lvnamed
  2292.  
  2293. The 'l' action is used to load a named variable with a string
  2294. value. ~FNamed variables~E can be used instead of the single letter
  2295. variables to hold information for expansion in text or in an action.
  2296.  
  2297. Parameter v is a single letter variable and 'named' is the name of
  2298. the named variable. The contents of the variable v are loaded into
  2299. the variable 'named'. Note that the name can be supplied by an
  2300. action modifier or by the expansion of a variable token, including
  2301. that of the same or another named variable.
  2302.  
  2303.     ltTime of day    - loads variable 't' to variable 'Time of day'
  2304.  
  2305. ~X1See also: ~FNamed variables~E, ~FSet variable~E, ~FSet Named Variable~E
  2306. .
  2307. .FRAME Popup menu display
  2308. .TITLE Action 'M' and 'm'
  2309. ~X1Format:    Mmenuname
  2310.       mmenuname
  2311.  
  2312. This action performs the action resulting from selection by the
  2313. user from the named menu. The uppercase form is used for global
  2314. menus and the lowercase form for local menus, where a local menu
  2315. is firstly looked for, with a global menu being looked for if a
  2316. local menu is not found. A menu action, and a menu action modifier,
  2317. may have special parameters added to select from the menu by means
  2318. other than interaction.
  2319.  
  2320.      mtype
  2321.  
  2322. ~X1See also: ~FMenu parameters~E
  2323. .
  2324. .FRAME Popup note display
  2325. .TITLE Action 'N' and 'n'
  2326. ~X1Format:   Nnotename{params}
  2327.      nnotename{params}
  2328.  
  2329. The action 'N' pops up the named note, and waits for a key/button
  2330. press before clearing the note. The uppercase form applies to
  2331. global notes and the lowercase form applies to local notes, where
  2332. a note local to the frame is firstly looked for and a global note
  2333. accessed if the local note cannot be found. Notes can contain
  2334. ~Freferences~E just as frames do, and these will be actioned if
  2335. selected.
  2336.  
  2337.    Nexample note
  2338.  
  2339. ~FParameters~E can be supplied on a note action.
  2340. .
  2341. .FRAME Option setting
  2342. .TITLE Action 'O'
  2343. ~X1Format:    O{*}os
  2344.  
  2345. The action 'O' is used to set HyperShell control options and colour
  2346. schemes. The variants are as follows:-
  2347.  
  2348. Ons       - Set option 'n' to 's'
  2349. O*ns      - Set extended option 'n' to 's'
  2350. OXfb      - Set colour scheme 'X' to foreground 'f' on background 'b'
  2351. OXnn      - Set colour scheme 'X' to atrribute nn
  2352. O*Xx      - Set application option 'X' to 'x'
  2353.  
  2354. ~FOptions~E and ~Fextended options~E control the operation of
  2355. HyperShell. Parameter n is the option number and s is the setting.
  2356. Some options have a set of flags values which should be added to
  2357. give the option value, others have a value to represent a funtion.
  2358.  
  2359. Individual flags can be set and cleared using the forms:-
  2360.     On+f  and On-f
  2361.  
  2362. Eg.  to switch on multiple search string support:-  O*8+4
  2363. ~G
  2364. ~FColour schemes~E are the highlighting schemes used for various
  2365. purposes in HyperShell. They are set to a two character colour
  2366. setting consisting of the foreground and background ~Fcolours~PFcolour codes~E.
  2367. Note that the brighter 8 colours are used for the background
  2368. scheme if blinking is required.
  2369.  
  2370.    ONyG      - set note references to bright yellow on dark green
  2371.  
  2372. The colour scheme can now be specified as a numeric attribute
  2373. value, as obtained using the &oX function.
  2374.  
  2375. This value is equal to the colour number of the background
  2376. colour times 16 plus the colour number of the foreground colour.
  2377. Colour numbers are 0 thru 7 (or 8 thru 15 for the bright
  2378. version, or blink in the case of background).
  2379.  
  2380. ~FApplication options~E are character settings used to control a
  2381. HyperShell application, and can act as ~Fcondition codes~PFconditions~E
  2382. These are set using the form
  2383.  
  2384.   O*Xx
  2385.  
  2386. Where X is the application option name of 'A' thru 'Z', and 'x'
  2387. is the character value assigned to that option. The option is
  2388. reset using the form 'O*X'.
  2389. .
  2390. .FRAME Printer output
  2391. .TITLE Action 'o'
  2392. ~X1Format:     ostring
  2393.  
  2394. The 'o' action prints the supplied 'string' to a route specified
  2395. by the printer option. The valid values, along with their routes,
  2396. are as follows:-
  2397.  
  2398.    0 - Display on bottom line
  2399.    1 - Print to printer
  2400.    2 - Send to standard output
  2401.    3 - Send to standard 'AUX' (e.g. RS232)
  2402.    4 - Send to 'output file' (that opened by action 'w')
  2403.  
  2404. If an invalid route is specified, output goes to the bottom line.
  2405. The printer is enabled by using '-p' on the command line, or by
  2406. issuing the action 'O51' to set option 5 to 1. Other routes are set
  2407. using 'O5n' where n is one of the above. The 'o' action adds a
  2408. carriage return and a line feed character to each line supplied.
  2409. ~G
  2410.     oLine of text          - output line of text to output route
  2411.  
  2412. To output a control code to the printer, such as a form feed, the
  2413. string function &Cnn can be used:-
  2414.  
  2415.    o&C12
  2416.  
  2417. CAUTION: It is wise to warn the reader to have the printer ready
  2418. .
  2419. .FRAME Popup message
  2420. .TITLE Action 'P'
  2421. ~X1Format:    Pmessage
  2422.  
  2423. The 'P' action pops up a flashing 'message' at the current mouse
  2424. cursor position, and awaits a key or mouse button depression
  2425. before 'popping down'.
  2426.  
  2427.    PHello there!
  2428.  
  2429. If a null string is passed as a parameter, an asterisk will flash
  2430. in the bottom right hand corner of the screen. This can be used as
  2431. a pause to await a key depression from the user before continuing
  2432. with a series of actions.
  2433. .
  2434. .FRAME Display message
  2435. .TITLE Action 'p'
  2436. ~X1Format:    pmessage
  2437.  
  2438. The 'p' action displays a 'message' at the bottom of the screen,
  2439. and continues without waiting for any inputs.
  2440.  
  2441.    pThis is a long message to stay on the screen
  2442.  
  2443. If no parameter is supplied to p, it clears any message currently
  2444. on display.
  2445. .
  2446. .FRAME Quit HyperShell
  2447. .TITLE Action 'Q'
  2448. ~X1Format:    Q{exit status}
  2449.  
  2450. This action is used to exit the HyperShell program. If a parameter
  2451. string is given, its numeric value is used as the exit status for
  2452. the HyperShell program. This means you can use hypershell in batch
  2453. files to control the flow, just as with the 'ask', 'choose' etc.
  2454. type of programs which set the exit status to be tested with the
  2455. 'IF ERRORLEVEL' statement. It is also possible that you may wish
  2456. to return information to a program that has invoked HyperShell
  2457. directly.
  2458.  
  2459.      Q1                    - exit with status 1
  2460. .
  2461. .FRAME Quit script
  2462. .TITLE Action 'q'
  2463. ~X1Format:    q
  2464.  
  2465. This action cancels any current script being executed. It can be
  2466. used to abort a script if an error situation occurs.
  2467. .
  2468. .FRAME Formatted read
  2469. .TITLE Action 'R'
  2470. ~X1Format:    Rsabc..
  2471.  
  2472. The 'R' action allows a line to be read from the input file
  2473. (opened via the 'r' action), split into fields separated by the
  2474. character 's', and assigned to a number of variables (abc etc).
  2475. If the character 's' is ommitted, the fields are assumed to be
  2476. separated by spaces. Separators can be any non-alphanumeric
  2477. character which can be supplied at this point in the action string.
  2478.  
  2479. When the end of the file is reached, no assignments are performed
  2480. and the error status is set.
  2481.  
  2482.     R:gja            - reads the next line from the file
  2483.                        and splits it on ':' characters into
  2484.                        variables g, j and a.
  2485.  
  2486. ~X1See also: ~FOpen/close input file~E
  2487. .
  2488. .FRAME Open/close input file
  2489. .TITLE Action 'r'
  2490. ~X1Format:     r{filename}
  2491.  
  2492. This action is used for opening or closing an input file dedicated
  2493. to applications use. If a parameter is supplied, it contains the
  2494. name of a file to open for input. If no parameter is supplied, the
  2495. input file is closed. The file opened via this action can be read
  2496. by the action modifier '!' or by the action 'R'. Note that on
  2497. opening an input file, any already open input file will be put in
  2498. suspension until the file is closed, at which time the original
  2499. file will again be available for reading. There can only be two
  2500. suspended input files.
  2501.  
  2502.      rDATABASE.DAT            - open DATABASE.DAT for reading
  2503.  
  2504. ~X1See also:- ~FFormatted read~E
  2505. .
  2506. .FRAME Execute script
  2507. .TITLE Action 'S' and 's'
  2508. ~X1Format:    Sscriptname
  2509.  
  2510. The 'S' action executes a named script. If a script is currently
  2511. being executed, it is cleared prior to running the specified
  2512. script. The 's' action looks for a script local to the frame,
  2513. and if not found looks for a global script.
  2514.  
  2515.        SShow price         - run script 'Show price'
  2516.  
  2517. ~FScripts~E can be appended to add ~Fsubroutines~PFcall subroutine~E.
  2518.  
  2519. If a script calls another script, the first script is cancelled.
  2520.  
  2521. ~FParameters~E can be supplied on a script action.
  2522.  
  2523. ~X1See also:- ~Fscripts~E, ~FParameters~E
  2524. .
  2525. .FRAME Display text file
  2526. .TITLE Action 'T'
  2527. ~X1Format:    T{filename}{#page}{/search string}
  2528.  
  2529. The 'T' action (Type file) page displays the named text file.
  2530. If no filename is supplied, reentry to a file display that has
  2531. been interrupted is assumed. The paged display highlights any
  2532. references embedded in the text file, unless the ~Fverbatim~PFOptions~E option
  2533. is set. If the ~F8 bit filter~PFOptions~E is set, the top bit is cleared on all
  2534. characters displayed (This is used for certain word processor files).
  2535.  
  2536. If a search string is specified, the string is located and the page
  2537. containing the string is displayed, with the line containing the
  2538. string highlighted. If a page number is specified, the display
  2539. locates at the page number, and is a search string is also specified
  2540. any line containing the search string is highlighted.
  2541.  
  2542.      Tmanual.txt           - display file 'manual.txt'
  2543.      Tcatalog.dat/chair    - display file and search for 'chair'
  2544.      Tcatalog.dat#8        - display file at page 8
  2545.      Tcatalog.dat#8/chair  - display at page 8 and highlight 'chair'
  2546.  
  2547. A number of function and control keys are supported:-
  2548.  
  2549.    F1 or ?         Help
  2550.    F2 or #         Request page number and go to page
  2551.    F3 or Pg Up     Go to previous page
  2552.    F4 or Home      Go to start of file
  2553.    F5              Search for next occurrence
  2554.    F6 or /         Request search string and perform search
  2555.    F7              Redisplay current page
  2556.    F8 or End       Go to end of file
  2557.    F9 or RETURN    Suspend typing, allowing subsequent return
  2558.    F10             Close file and exit typing
  2559.  
  2560.    Ctrl-Right      Scroll Right to view text off screen
  2561.    Ctrl-Left       Scroll screen to left
  2562.    Ctrl-Home       Cycle text interpretation filter
  2563.    ESCAPE          Exit typing and cancel script
  2564.    Pg Dn or other
  2565.     unmapped key   Go to next page
  2566. ~G
  2567. The RETURN key, if over a highlighted reference, selects the
  2568. reference, otherwise it returns to the current frame display,
  2569. and permits subsequent return to viewing of the file by use of
  2570. the 'T' action with no parameter. A further T action, supplying
  2571. a parameter, will close the file on display and start a new one.
  2572. If action 'T*' is given when a Typed file is current (ie. RETURN was
  2573. pressed from a Tfilename display), it closes the current Typed file,
  2574. so that it can be used for other purposes, and stops the T action
  2575. from re-entering the file display.
  2576.  
  2577. References selected from the text will be acted on. Certain
  2578. references will have a 'T' action appended so that viewing of
  2579. the file will resume after the action has been performed.
  2580.  
  2581. The F6 or '/' key will prompt for a search string, and search
  2582. forward  through the file for that string, stopping at the page
  2583. containing the string and highlighting any lines containing the
  2584. string. A ~Fpattern match~E search can be specified by starting the
  2585. search string with the '^' character. Further occurrences of the
  2586. string can be located by pressing F5.
  2587.  
  2588. The F2 or '#' key will prompt for a page number, and will then
  2589. locate and display the page.
  2590. .
  2591. .FRAME File popup note
  2592. .TITLE Action 't'
  2593. ~X1Format:    tfilename
  2594.  
  2595. The 't' action displays the contents of a file as a popup note, the
  2596. filename having an explicit extension or a default implicit extension
  2597. of '.NTE'. The file notes can contain the same as normal ~Fnotes~E,
  2598. and can contain references which can be selected. The file note is
  2599. used for a number of purposes, and usually indicates that the note
  2600. is less permanent than one included in the hyperfile. It could, for
  2601. instance, be a scratchpad note created by the HyperShell user.
  2602.  
  2603. If a text line in a note file starts with the '.' character, that
  2604. line and the remaining lines are not displayed.
  2605.  
  2606.      tprices             - pops up note file PRICES.NTE
  2607.  
  2608. ~FParameters~E can be supplied on a file note action.
  2609. .
  2610. .FRAME Set variable
  2611. .TITLE Action 'V'
  2612. ~X1Format:    Vxstring
  2613.  
  2614. The 'V' action allows a variable 'x' to be set to a 'string'. There
  2615. are 52 applications variables named 'a' to 'z' and 'A' to 'Z'.
  2616. There are a few system variables that may be set using this command
  2617. also, although the numeric ones cannot be changed. ~FVariables~E can
  2618. hold any string value, and can also hold numeric data as a numeric
  2619. string. Variables can be expanded into the frame text display, a
  2620. note display, or into an action string, by specifying the variable
  2621. substitution token '$$x' where x is the variable name.
  2622.  
  2623.      VnJohn Smith     - set variable 'n' to 'John Smith'
  2624.  
  2625. The 'named' variables described under the 'l' action may not be set
  2626. using this action.
  2627.  
  2628. ~X1See also: ~FTest variable~E
  2629. .
  2630. .FRAME Test variable
  2631. .TITLE Action 'v'
  2632. ~X1Format:    vxstring
  2633.  
  2634. The 'v' action compares the variable 'x' against the 'string',
  2635. setting condition codes to reflect the result of the comparison.
  2636. A lexical comparison is performed, unless the comparand string
  2637. starts with a numeric digit or a minus sign, in which case an
  2638. integer numeric comparison is made. A substring search of both
  2639. operands within each other. The resulting ~Fcondition codes~PFconditions~E can be
  2640. used in the 'j', 'a' and 'z' actions, and other places.
  2641.  
  2642.       vnSmith;jcSMITHS  - jumps to SMITHS if 'n' contains 'Smith'
  2643.  
  2644. Pattern matching is performed during a variable comparison if
  2645. variable '~~' is set. If the supplied pattern starts with a '^'
  2646. character, the variable is compared against the supplied pattern
  2647. using a ~FPattern Match~E process, otherwise a case sensitive
  2648. comparison is performed. If the comparison succeeds, condition code
  2649. 'm' is set, else condition code 'f' is set. If variable '~~' is NOT
  2650. set, the condition code  'f'  will  be set in ALL CASES (even when
  2651. condition code 'e' is set).
  2652.  
  2653.  
  2654. To test a named variable, it first has to be loaded into a single
  2655. letter variable using the form:-
  2656.  
  2657.      Vx$$(named)
  2658.  
  2659. This may then be used in the test:-
  2660.  
  2661.      vxtest value
  2662.  
  2663. ~X1See also: ~FSet variable~E
  2664. .
  2665. .FRAME Write record to file
  2666. .TITLE Action 'W'
  2667. ~X1Format:     Wstring
  2668.  
  2669. The 'W' action writes the parameter string to the output file
  2670. opened via the 'w' action.
  2671.  
  2672.      WRhododendron      - writes 'Rhododendron' to file
  2673.  
  2674.  A line can be formatted to contain the
  2675. values of variables by simply specifying the variable expansion
  2676. tokens at the required place in the line. Thus to write a line with
  2677. variables a,b,c in it separated by colons, we specify:-
  2678.  
  2679.    W$$a:$$b:$$c
  2680. .
  2681. .FRAME Open/close output file
  2682. .TITLE Action 'w'
  2683. ~X1Format:    w{filename}
  2684.       w{filename+}
  2685.  
  2686. This action is used for opening or closing an output file for
  2687. hyperfile applications to use. If a parameter is supplied, it
  2688. contains the name of a file to open for output. If no parameter is
  2689. supplied, the output file is closed. If a suffix of '+' is added,
  2690. an existing file is opened for extension. The file opened via this
  2691. action can be written to using the 'W' action. If the file cannot
  2692. be opened, an error status is set.
  2693.  
  2694.      wprices.dat    - opens file PRICES.DAT for writing
  2695.  
  2696. On opening an output file, any already open output file will be
  2697. put in suspension until the file is closed, at which time the
  2698. original file will again be available for writing. There can only
  2699. be two suspended output files.
  2700. .
  2701. .FRAME Execute program
  2702. .TITLE Action 'X' and 'x'
  2703. ~X1Format:    Xcommand line
  2704.       xcommand line
  2705.  
  2706. The 'X' action executes the program and parameters supplied in the
  2707. parameter string, and returns to HyperShell when the program
  2708. terminates. The uppercase form waits for a key press before
  2709. redisplaying the current frame, the lowercase form returns
  2710. immediately to the display. The system variable '^' is set to the
  2711. numeric exit code of the program.
  2712.  
  2713.      Xpayroll week 1   - runs program 'payroll' with parameters
  2714.  
  2715. Care should be exercised when specifying the program invocation,
  2716. as certain errors will 'crash' the computer and require a reboot.
  2717. If in doubt, use the 'D' action, which is safer. The X actions are
  2718. more efficient in speed and memory utilisation, however, and the
  2719. exit code of the executed program is always available.
  2720. .
  2721. .FRAME Clear status
  2722. .TITLE Action 'Y'
  2723. ~X1Format:    Y
  2724.  
  2725. The 'Y' action does nothing, apart from reset the error status to
  2726. 0. It is also used to 'throw away' the results of an action
  2727. modifier.
  2728.  
  2729. If the special system variable (`) is used, the Y action
  2730. should be used to reset the error status so that the error
  2731. action mapped to the variable is performed on an error.
  2732. .
  2733. .FRAME Refresh frame display
  2734. .TITLE Action 'y'
  2735. ~X1Format:    y{c}
  2736.  
  2737. The 'y' action refreshes the current frame display. If a
  2738. parameter 'c' is supplied, and the frame occupies more than
  2739. one screenful, the action has the following effects:-
  2740.  
  2741.       y              - display first page of frame
  2742.       y#             - redisplay current page of frame
  2743.       y-             - display previous page of frame
  2744.       y+             - (or any other character than '-' or '#')
  2745.                        display next page of frame or first
  2746.                        page if at end
  2747. .
  2748. .FRAME Unless condition
  2749. .TITLE Action 'z'
  2750. ~X1Format:     zcaction
  2751.  
  2752. The 'z' action works in the same way as the ~Fconditional action~E
  2753. does, but the action is only performed if the condition is FALSE.
  2754.  
  2755.      vn23;zlJGREQ - jumps to GREQ if 'n' not less than 23
  2756. .
  2757. .FRAME Extended action codes
  2758. .TITLE Action codes 'Z'
  2759. The 'Z' code introduces an 'extended' action code. This is one
  2760. where a second character denotes the action to be performed.
  2761.  
  2762. As action modifier codes are required in the second or third
  2763. character position, only the third character position is
  2764. available with these action codes. This does have advantages
  2765. in some cases.
  2766. .
  2767. .FRAME Specified autoreference
  2768. .TITLE Action code 'ZA'
  2769. ~X1Format:    ZArreference:action
  2770.       ZArreference
  2771.  
  2772. The 'ZA' action sets up an autoreference specification. The 'r'
  2773. parameter is the reference type, and can be one of the reference
  2774. flags A,F,f,M,m,N,n,S,s,t. action is the action string to be
  2775. mapped to the reference. If the action part is ommitted, as in
  2776. the second format above, the action string defaults to just
  2777. 'rreference'. When the autoreference is applied, instances of
  2778. string 'reference' are replaced by the string:-
  2779.  
  2780.     ~~rreference~~Paction~~E    - for first format
  2781.  
  2782.     ~~rreference~~E        - for second format
  2783.  
  2784. To perform autoreferencing, the options 4 and *4 should be set
  2785. appropriately (4 should be 2 or 3, *4 should be 0 or 1).
  2786.  
  2787. This form of autoreferencing can be used for glossary references
  2788. to global notes, or for ~Falternative hypertext~E referencing.
  2789.  
  2790. Examples:
  2791.  
  2792.      ZANTSR        - sets autoreference for note 'TSR'
  2793.  
  2794. This sets note reference flags on all occurences of the string
  2795. 'TSR' in the text.
  2796.  
  2797.      ZAAQuit:Q     - sets up an action autoreference
  2798.  
  2799. This maps the 'Q' action to all occurrences of the word 'Quit'
  2800. in the text.
  2801. .
  2802. .FRAME Search string autoref
  2803. .TITLE Action code 'Za'
  2804. ~X1Format:    Zarssssssssssssssssssssssssss:action
  2805.  
  2806. The 'Za' action sets up an autoreference specification which
  2807. causes the last search string to be autoreferenced. The 'r'
  2808. parameter is the reference type, and can be one of the reference
  2809. flags A,F,f,M,m,N,n,S,s,t. action is the action string to be
  2810. mapped to the reference.
  2811.  
  2812. When the autoreference is applied, instances of the search
  2813. string are replaced by the string:-
  2814.  
  2815.     ~~rsearchstring~~Paction~~E
  2816.  
  2817. To perform autoreferencing, the options 4 and *4 should be set
  2818. appropriately (4 should be 2 or 3, *4 should be 0 or 1).
  2819.  
  2820. THIS ACTION MUST ONLY BE SPECIFIED ONCE. The search string will
  2821. be maintained as an autoreference. Beware of specifying a very
  2822. common search string eg. 'e', otherwise the references will
  2823. overrun the display.
  2824. .
  2825. .FRAME Sound Bell
  2826. .TITLE Action code 'ZB'
  2827. ~X1Format:    ZB
  2828.  
  2829. The 'ZB' code causes the audible warning device to be deployed.
  2830. This usually emits a 'beep' sound.
  2831.  
  2832. ~p    ~APress this if you haven't heard one before~PZB~E
  2833. .
  2834. .FRAME Blink enable
  2835. .TITLE Action code 'Zb'
  2836. ~X1Format:    Zb1
  2837.       Zb0
  2838.  
  2839. The 'Zb' action changes the way the text screen handles the 'blink'
  2840. attribute. The settings are as follows:-
  2841.  
  2842.   Zb1       - Blink characters with high bit set (lowercase colours)
  2843.   Zb0       - High intensity background for characters with high bit
  2844.  
  2845. This action may be used on various display adaptors to change the
  2846. appearance of the text, and allow high intensity background colours
  2847. to be set.
  2848.  
  2849. ~X1CAUTION:     THE ADAPTOR IS LEFT IN THE CURRENT STATE ON PROGRAM EXIT
  2850. .
  2851. .FRAME Do control menu
  2852. .TITLE Action code 'ZC'
  2853. ~X1Format:    ZC
  2854.  
  2855. The 'ZC' code causes the HyperShell control menu to be presented
  2856. for selection. It is by default mapped to the ESC key.
  2857. .
  2858. .FRAME Set configuration string
  2859. .TITLE Action code 'Zc'
  2860. ~X1Format:    Zc
  2861.  
  2862. This action takes a configuration string as found in the
  2863. HYPSHELL.CFG file, and applies it. This is equivalent to the #K
  2864. action in HI.EXE, and does not free memory for previously
  2865. configured instances of that configuration string.
  2866. .
  2867. .FRAME Delete named variables
  2868. .TITLE Action code 'ZD' [G]
  2869. ~X1Format:    ZDpattern
  2870.  
  2871. The ZD action deletes all named variables conforming to the
  2872. given pattern. The pattern string is as described under the
  2873. ~FPattern match~E rules.
  2874.  
  2875. NOTE: AT LEAST ONE NAMED VARIABLE MUST REMAIN AT ALL TIMES !!
  2876. .FRAME Exit subroutine
  2877. .TITLE Action code 'ZE'
  2878. ~X1Format:     ZE
  2879.  
  2880.     The 'ZE' action returns from a subroutine called in a ~Fscript~PFscripts~E
  2881.     by the ~FCall subroutine~E action.
  2882.  
  2883.     If no subroutine is in effect, no return is made.
  2884.  
  2885. .
  2886. .FRAME Set footer depth
  2887. .TITLE Action code 'ZF'
  2888. ~X1Format:    ZFnn
  2889.  
  2890. The 'ZF' action sets the depth reserved for the ~Ffooter~E section
  2891. for when conditional lines are included in the footer. The depth
  2892. should accommodate the footer text with the most lines.
  2893.  
  2894. This action is used in the SETUP script, if required. It is not
  2895. necessary where the footer is of fixed content, as it will be
  2896. determined automatically when the header is loaded.
  2897.  
  2898.       ZF4         - set footer depth to 4
  2899. .
  2900. .FRAME Get mouse coordinates
  2901. .TITLE Action code 'ZG'
  2902.  
  2903. The 'ZG' action causes the mouse coordinates to be read into the
  2904. variables used by the ~Fzone selection~E operation normally after
  2905. a graphics display.
  2906.  
  2907. These variables can be accessed using the functions &X and &Y,
  2908. or a zone selection could be performed based on the new values.
  2909. .
  2910. .FRAME Special graphic selection
  2911. .TITLE Action code 'Zg'
  2912. ~X1Format:    Zg
  2913.       Zgx
  2914.  
  2915. The 'Zg' action will cause the mouse to be used for selection from
  2916. the screen currently on display. If a parameter is supplied as in
  2917. the second format, the screen is assumed to have a high vertical
  2918. resolution (greater than 200) when calculating the mouse
  2919. coordinates.
  2920.  
  2921. This is used where some external program is used to display the
  2922. graphic screen, or possibly when a further selection is needed
  2923. from a screen displayed using the 'g' ~Fgraphic screen display~E.
  2924.  
  2925. .
  2926. .FRAME Hold line for return
  2927. .TITLE Action code 'ZH'
  2928. ~X1Format:   ZH
  2929.  
  2930. The 'ZH' action causes the current line number to be held in
  2931. the subroutine call stack, permitting a return to be made to
  2932. the current line using the ~FExit subroutine~E action. This is
  2933. used as an alternative method for loop constructs:-
  2934.  
  2935.    -- open file
  2936.    rfilename.ext
  2937.    -- read file
  2938.    ZH;Y;R,abc
  2939.    jsEOF
  2940.    P$a $b $c
  2941.    -- loop back to read
  2942.    ZE
  2943.    LEOF
  2944.    r
  2945.    q
  2946. .
  2947. .FRAME Quick conditional
  2948. .TITLE Action code 'ZI'
  2949. ~X1Format:    ZIexpr;action . . .
  2950.  
  2951. The 'ZI' action, pronounced 'if', allows a single line conditional
  2952. statement to be coded. The 'expr' represents a numeric expression
  2953. as used in the ~FExpression Evaluation~E action modifier, but
  2954. without the introductory '=' sign. If the expression evaluates to
  2955. TRUE (having a value other than 0), then the remaining actions of
  2956. the multiple action are performed, otherwise they are ignored.
  2957. Condition codes are not affected by this action, unless the
  2958. combined string compare and condition truth test (quotes) is used.
  2959.  
  2960. With the extended ~Fexpression evaluation~E capabilities, this makes
  2961. multiple conditions easy to specify. For example to test if variable
  2962. 'x' is in the range 10 to 15 inclusive, and print a message if not,
  2963. the following multiple action is coded.
  2964.  
  2965.    ZI(x < 10) ! (x > 15);pValue outside permitted range
  2966.  
  2967. .
  2968. .FRAME If number
  2969. .TITLE Action code 'Zi'
  2970. ~X1Format:    Zinumber;action . . .
  2971.  
  2972. The 'Zi' action is similar to the ~FQuick Conditional~E action. It allows
  2973. a single line conditional statement to be coded. The 'number' is any
  2974. modifier which returns a numeric result. A non-zero result will cause
  2975. the remaining actions of the multiple action are performed, otherwise
  2976. a zero result will cause them to be ignored.
  2977.  
  2978. Condition codes are not affected by this action.
  2979.  
  2980. Example:-
  2981.  
  2982.     Zi&L$$F;VL$$F
  2983.  
  2984. If the length of variable F is greater than 0, load it to variable L.
  2985.  
  2986.  
  2987. .
  2988. .FRAME Call subroutine
  2989. .TITLE Action code 'ZJ'
  2990. ~X1Format:     ZJlabel
  2991.  
  2992. The 'ZJ' action acts like the ~FJump within script~E action, only the
  2993. current position in the script is retained so that it can be
  2994. returned to using the ~FExit subroutine~E action. If the label does
  2995. not exist, no branch is made, but the position is marked so that a
  2996. return can be made.
  2997.  
  2998. Subroutines can nest up to 10 deep.
  2999.  
  3000.  . . .
  3001.  ZJDouble        - branches to subroutine 'Double'
  3002.  . . .           - return to here when subroutine exits
  3003.  
  3004.  LDouble         - start of subroutine 'Double'
  3005.  . . .
  3006.  ZE              - exit from subroutine
  3007. .
  3008. .FRAME Local flag toggle
  3009. .TITLE Action code 'ZL'
  3010. ~X1Format:    ZLn{s}
  3011.  
  3012. The 'ZL' action toggles the frame local flag 'n', and causes the
  3013. display to be refreshed, unless the refresh suppression character
  3014. 's' is specified. The flag 'n' has a value of '0' to '9' or one
  3015. of the special local flags '/' or ':'.
  3016.  
  3017. This is used for ~Ainline text expansion~PZL3~E using a reference
  3018. of the form:-
  3019.  
  3020.    ~~Ainline text expansion~~PZL3~~E
  3021.  
  3022. ~h3     Inline text expansion is used to provide additional information
  3023. ~h3     hidden within the text until a reference is selected. This is
  3024. ~h3     useful where an expert would not want to read mundane details
  3025. ~h3     which a novice would require. The local flag is usually used
  3026. ~h3     for this, although a ~Fglobal flag~PFglobal options~E can be used where an overall
  3027. ~h3     expansion of text for a novice is required.
  3028. .
  3029. .FRAME Local flag indicator
  3030. .TITLE Action code 'Zl'
  3031. ~X1Format:   Zlc{i}
  3032.  
  3033. The 'Zl' action is used to select which of the ~Flocal flags~E will
  3034. cause an indicator to be displayed in the ~Fcontents list~E.
  3035.  
  3036. The 'c' parameter is the local flag code to be used. The optional
  3037. 'i' parameter is a single character indicator which is displayed
  3038. next to the key map box in the contents list.
  3039.  
  3040. ~X1Example:
  3041.  
  3042. Zl:
  3043.  
  3044. This causes the default indicator '√' to be shown in the contents
  3045. for frames which have been visited.
  3046. .
  3047. .FRAME Set 43 or 50 line mode
  3048. .TITLE Action code 'ZM'
  3049. ~X1Format:    ZM{nn}
  3050.  
  3051. The 'ZM' action sets the video mode for the adaptor.
  3052.  
  3053.    ZM3         80 column by 25 line mode (default)
  3054.    ZM64        80 column by 43 or 50 line mode
  3055.  
  3056. This should only be used with EGA and VGA adaptors. In the 43/50
  3057. line mode, depending on the mouse driver and adaptor, different
  3058. degrees of control are available over the mouse cursor. You may
  3059. find that it is not possible to properly use the extra lines.
  3060. Using the -m flag on the command line may allow you to move the
  3061. cursor below line 25 using keyboard control.
  3062.  
  3063. All paged lists and the typed file display make use of the extra
  3064. lines.  Frame text also makes use of it, provided the footer has
  3065. not truncated it at an earlier line. The number of lines is
  3066. returned by function call &R25.
  3067. .
  3068. .FRAME Set message line
  3069. .TITLE Action code 'Zm'
  3070. ~X1Format:    Zmnn
  3071.  
  3072. Messages and prompted input is usually restricted to line 25, or
  3073. the bottom line of deeper displays. This action can be used to
  3074. change the message and input line to another line. Applications
  3075. can then utilise different screen formats with messages appearing
  3076. on, for example, the second line.
  3077. .FRAME Save notepad
  3078. .TITLE Action code 'ZN'
  3079. ~X1Format:    ZNfilename.ext
  3080.  
  3081. The 'ZN' action saves the current notepad, variables and current
  3082. frame name, as selected using option 0, in the named file.
  3083.  
  3084.   See   ~FOptions~E
  3085.  
  3086. The saved file can subsequently be run as a script, using the
  3087. 'c' action, to reinstate the notepad and other items.
  3088.  
  3089.   See   ~FCall script file~E
  3090. .
  3091. .FRAME Print frame
  3092. .TITLE Action code 'Zo'
  3093. ~X1Format:     Zo                             (HL.EXE ONLY)
  3094.        Zot                            (HL.EXE ONLY)
  3095.  
  3096. The 'Zo' action prints the current frame text to a route specified
  3097. by the printer option (O5) as for the 'o' action - see ~FPrinter output~E.
  3098.  
  3099. If an invalid route is specified, there is no output.
  3100.  
  3101. If the 't' parameter is supplied, the frame name and title are
  3102. printed before the frame text, and a blank line printed after.
  3103.  
  3104. This action is only available in the HL.EXE component. The HI.EXE
  3105. component has the #P action which does a similar thing.
  3106.  
  3107. CAUTION: It is wise to warn the user to have the printer ready
  3108. .
  3109. .FRAME Preload hyperfile
  3110. .TITLE Action code 'ZP'
  3111. ~X1Format:    ZPhyperfile
  3112.  
  3113. The 'ZP' action causes a hyperfile to be loaded without any frame
  3114. being displayed from it. This is useful to load a set of hyperfiles
  3115. during the SETUP script, to permit searches to be made across them.
  3116.  
  3117.      ZPextra             - preloads EXTRA.HYP
  3118. .
  3119. .FRAME Recall saved screen
  3120. .TITLE Action code 'ZR'
  3121. ~X1Format:    ZR
  3122.  
  3123. The 'ZR' action displays the screen that was saved at startup, if
  3124. the '-s' flag was specified on the command line. If this flag was
  3125. not specified, nothing happens.
  3126.  
  3127. The frame is redisplayed when any key is pressed.
  3128. .
  3129. .FRAME Reset to full screen
  3130. .TITLE Action code 'Zr'
  3131. ~X1Format:    Zr
  3132.  
  3133. The 'Zr' action is used to reinstate the full screen mapping
  3134. after a window has been defined within the screen using the
  3135. ~Fbox draw~E reference flag, usually through a 'i' action.
  3136. .
  3137. .FRAME Set environment variable
  3138. .TITLE Action code 'ZS'
  3139. ~X1Format:    ZSenvironment string assignment
  3140.  
  3141. The 'ZS' action causes an environment variable to be set, which can
  3142. be used elsewhere in HyperShell using the ~Fenvironment variable~E
  3143. modifier, or passed to a program invoked from HyperShell, such as
  3144. dBASE III, which can access the variable to obtain parametric
  3145. information.
  3146.  
  3147.      ZSNAME=FRED JONES   - equivalent to SET NAME=FRED JONES
  3148.                            on the DOS command line.
  3149. .
  3150. .FRAME Take copy of screen
  3151. .TITLE Action code 'ZT'
  3152. ~X1Format:   ZT
  3153.  
  3154. The 'ZT' action takes a copy of the current screen display.
  3155.  
  3156. The whole screen is saved to the screen save area
  3157. (and overwrites that set up by the -s flag, if one was specified).
  3158.  
  3159. The saved screen is displayed using the ~FShow saved screen~E action.
  3160.  
  3161. This may be used before a ~Fsubwindow~PFBox draw~E is drawn, to allow the
  3162. subwindow to be 'popped down' after use.
  3163.  
  3164. ~X1CAUTION: These actions can be used for other purposes, but care must
  3165. be taken not to confuse the user with false reference mappings.
  3166. .
  3167. .FRAME Show saved screen
  3168. .TITLE Action code 'Zt'
  3169. ~X1Format:   Zt
  3170.  
  3171. The 'Zt' action shows the screen display saved by a previous
  3172. ~FTake copy of screen~E action. If no saved screen is available,
  3173. this action acts as a 'clear screen' command.
  3174.  
  3175. The whole screen is overlaid by the saved screen save area
  3176. (or the one that set up by the -s flag, if one was specified).
  3177.  
  3178. A number of subwindows can be drawn, and cleared again afterwards
  3179. using the Show saved screen action.
  3180.  
  3181. ~X1CAUTION: These actions can be used for other purposes, but care must
  3182. be taken not to confuse the user with false reference mappings.
  3183. .
  3184. .FRAME Unget key code
  3185. .TITLE Action code 'ZU'
  3186. ~X1Format:    ZUc{ttt}
  3187.  
  3188. The 'ZU' action is used to place a character in the key input
  3189. so that the action mapped to that character will be performed
  3190. as though the key had been pressed. This can be used for frame
  3191. display inputs, note display inputs, popup request inputs and
  3192. graphic display inputs. It cannot be used for popup menus or
  3193. for paged lists.
  3194.  
  3195. If the ttt parameter is supplied, it is used as a timeout
  3196. period in hundredths of a second. In this case, the user is
  3197. given the opportunity of typing a character, which will be
  3198. used instead of the timeout character. The cursor and tab
  3199. keys, and mouse movement, do not count as key presses. The
  3200. timeout period starts as soon as input is expected:-
  3201.  
  3202.   ZU+300;Fone
  3203.  
  3204. Display frame 'one', then timeout with '+' key after 3 seconds.
  3205. .
  3206. .FRAME Set Named Variable
  3207. .TITLE Action code 'ZV'
  3208. ~X1Format:   ZVnamed=value
  3209.  
  3210. The 'ZV' action is used to set a named variable to a string
  3211. value. ~FNamed variables~E can be used instead of the single letter
  3212. variables to hold information for expansion in text or in an action.
  3213.  
  3214. 'named' is the name of the named variable. Note that the name can be
  3215. supplied in part or in full by the expansion of a variable token,
  3216. allowing a form of 'subscripting' for arrays of values.
  3217.  
  3218. ~X1Example:
  3219.  
  3220.     ZVdate=$$4               - set variable 'date' to current date
  3221.  
  3222. ~X1See also: ~FNamed variables~E, ~FSet variable~E, ~FLoad named variable~E
  3223. .
  3224. .FRAME Set mouse column
  3225. .TITLE Action code 'ZX'
  3226. ~X1Format:    ZXnn
  3227.  
  3228. The 'ZX' action sets the 'x' position of the mouse cursor, namely
  3229. the column number, from 1 to 80. The 'y' position, or line number,
  3230. stays the same.
  3231.  
  3232.       ZX3              - set mouse cursor at column 3
  3233. .
  3234. .FRAME Set mouse line
  3235. .TITLE Action code 'ZY'
  3236. ~X1Format:    ZYnn
  3237.  
  3238. The 'ZY' action sets the 'y' position of the mouse cursor, namely
  3239. the line number, from 1 to 25. The 'x' position, or column number,
  3240. stays the same.
  3241.  
  3242.      ZY15              - set mouse cursor at line 15
  3243. .
  3244. .FRAME Bitmap sublanguage
  3245. .TITLE Action code 'ZZ' [G]
  3246.  
  3247. The 'ZZ' action and the reference extensions provide access to this
  3248. language. The ZZ action takes the command string as its parameter
  3249. string.  The format of the sublanguage command string is as follows:-
  3250.  
  3251.     commands^item
  3252.  
  3253. 'commands' are an ordered sequence of single letter commands.
  3254. 'item' is the name used to reference the bitmap. This applies either
  3255. to a disk file, a member of a library, or a named variable.  The
  3256. format of 'item' is filename.ext
  3257.  
  3258. A general 'save area', or buffer, is used for bitmaps in transit.
  3259. This is used for saving the area where 'popup' items appear, and is
  3260. also used for bitmaps loaded for display. It is important to remember
  3261. this when considering the sublanguage commands.
  3262.  
  3263. The bitmap images are located on character cell boundaries and
  3264. are sized in character cells. Character cells are always 8 bits
  3265. wide. The cell height is as follows:-
  3266.  
  3267.        8  bits for CGA and EGA 640x200
  3268.        14 bits for EGA 640x350
  3269.        16 bits for VGA 640x480
  3270.  
  3271. [1]  ~AList sublanguage commands~PA@C0Sublang~K1~E
  3272. .FRAME Get image
  3273. .TITLE Sublanguage command G [G]
  3274.  
  3275. The G command gets the image from the screen to the general save area
  3276.  
  3277. The region on the screen to be copied is marked by using the ZG action
  3278. with the mouse positioned at the top left, then positioning the mouse
  3279. at bottom right before using the ZZ action to obtain the image.
  3280.  
  3281.    screen clip -> general save area
  3282.  
  3283. .FRAME Get reference image
  3284. .TITLE Sublanguage command C [G]
  3285.  
  3286. The region on the screen to be captured is obtained from the last
  3287. reference selected. The reference can be a text reference or a graphic
  3288. reference. This is used for reference inversion and flashing.
  3289.  
  3290.     screen clip -> general save area
  3291.  
  3292. .FRAME Write image to file
  3293. .TITLE Sublanguage command W [G]
  3294.  
  3295. This writes the image obtained using the 'G' command to a file in .HGP
  3296. format.
  3297.  
  3298.         general save area -> file
  3299.  
  3300. .FRAME Read image from file
  3301. .TITLE Sublanguage command R [G]
  3302.  
  3303. This reads a .HGP format file into the general save area.
  3304. (filename = item)
  3305.  
  3306.         file -> general save area
  3307.  
  3308. .FRAME Save image to memory
  3309. .TITLE Sublanguage command S [G]
  3310.  
  3311. This saves the image to a named variable with name = item. It
  3312. recognises if the image is a compressed image so that it may be loaded
  3313. in the correct fashion.
  3314.  
  3315.         general save area -> memory
  3316. .FRAME Read and save image
  3317. .TITLE Sublanguage command V [G]
  3318.  
  3319. Read image and store in variable of same name.  This combines the
  3320. functions of the R and S commands
  3321.  
  3322.         file -> general save area
  3323.         general save area -> memory
  3324. .FRAME Load image from memory
  3325. .TITLE Sublanguage command L [G]
  3326.  
  3327. This points the load pointer, which usually points at the general save
  3328. area, at the named variable.  It allows a bitmap to be displayed
  3329. directly from the variable memory using the P command. (NOTE:
  3330. Decompresses image if compressed (as D below))
  3331.  
  3332.         point at memory
  3333. .FRAME Load and decompress image
  3334. .TITLE Sublanguage command D [G]
  3335. This loads and decompresses an image (saved with S or X) to the
  3336. general save area
  3337.  
  3338.         memory -> decompress -> general save area
  3339. .FRAME Open library file
  3340. .TITLE Sublanguage command O [G]
  3341.  
  3342. This opens a library file with name = item  (eg. ZZO^GLIB.HLB) ready
  3343. for use with library commands.  The library stays open until either
  3344. you open another library or you open an invalid library name to close
  3345. it.
  3346.  
  3347. NOTE:  YOU MUST SPECIFY THE FILE EXTENSION
  3348.  
  3349.     close library if open
  3350.     open library file
  3351. .FRAME Extract item from library
  3352. .TITLE Sublanguage command X [G]
  3353.  
  3354. This extracts an item from the library with name = item and store
  3355. it as the same name. (eg. ZZX^TEST.CMP)
  3356.  
  3357.         library -> memory
  3358.  
  3359. .FRAME Soft extract
  3360. .TITLE Sublanguage command E [G]
  3361.  
  3362. Extract itrm from library if not already loaded
  3363.  
  3364.      if memory does not exist, library -> memory
  3365.  
  3366. .FRAME Position at mouse cursor
  3367. .TITLE Sublanguage command M [G]
  3368.  
  3369. Position the top left of the image at the mouse cursor.
  3370. .FRAME Position at text cursor
  3371. .TITLE Sublanguage command T [G]
  3372.  
  3373. Position the top left of the image at the text cursor.
  3374. .FRAME Position at box top
  3375. .TITLE Sublanguage command B [G]
  3376.  
  3377. Position the top left of the image at the box top position. This is
  3378. the point specified by ~~a.
  3379.  
  3380. .FRAME Put image to screen
  3381. .TITLE Sublanguage command P [G]
  3382.  
  3383. This displays the current image to the screen.
  3384.  
  3385.         general save area (or memory) -> screen
  3386.  
  3387. The P command can be made to offset the image downwards a number of
  3388. pixel lines by prefixing it with the sequence +n   where n is 0 to 9
  3389. (note n can also be one of the characters after 9 in the ASCII set so
  3390. +: offsets 10, +< offsets 12 etc.)
  3391.  
  3392. This may be used to locate an image precisely on any vertical
  3393. position. Example LT+2P^leaf.hgp displays leaf.hgp at the text
  3394. position plus 2 pixels vertical displacement.
  3395.  
  3396. .FRAME Invert image at pointer
  3397. .TITLE Sublanguage command I [G]
  3398.  
  3399. This inverts the image currently pointed to. This is usually used
  3400. immediately prior to a 'P' operation, but may be used for other
  3401. purposes.
  3402.  
  3403. 1.  If this is done after an L operation (point to memory), then the
  3404. stored image will be inverted. A second inversion will restore the
  3405. image to normal in this case.
  3406.  
  3407. 2.  If this is done after a D operation (decompress to save area),
  3408. then the transient image will be inverted, and the stored (compressed)
  3409. image will not be affected.
  3410.  
  3411.         invert (pointer ->) image
  3412.  
  3413. .FRAME Wait a while
  3414. .TITLE Sublanguage command Z [G]
  3415.  
  3416. Wait for 20ms. This is used to introduce a pause for image inversion
  3417. flashing etc. A number of Zs can be put together for longer pauses.
  3418.  
  3419. .FRAME Play sound sample
  3420. .TITLE Sublanguage command H [G]
  3421.  
  3422. This plays the current image buffer as a sound sample through
  3423. IBMSND.COM driver. The sample must be in HSN format.
  3424.  
  3425.         general save area (or memory) -> sound driver
  3426.  
  3427. .FRAME Load image as mouse cursor
  3428. .TITLE Sublanguage command A [G]
  3429.  
  3430. This loads the current image buffer as a mouse cursor
  3431.  
  3432.         general save area (or memory) -> mouse cursor
  3433.  
  3434. .FRAME Load file as font
  3435. .TITLE Sublanguage command F [G]
  3436.  
  3437. This loads the current image buffer as a font into the CHARBIOS
  3438. buffer.  It requires CHARBIOS to be loaded.
  3439.  
  3440.         general save area (or memory) -> font bank
  3441.  
  3442. .FRAME Load 16 colour palette
  3443. .TITLE Sublanguage command U [G]
  3444.  
  3445. Loads current image buffer as a palette (uses .PAL files)
  3446.  
  3447.         general save area (or memory) -> palette registers
  3448.  
  3449. .FRAME Load 256 colour screen
  3450. .TITLE Sublanguage command J [G]
  3451.  
  3452. Loads the current image buffer as a full low res 256 colour screen.
  3453. This requires that the mode has been set to 19 using the ZM command.
  3454.  
  3455.         general save area (or memory) -> screen memory
  3456.  
  3457. .FRAME Test CHARBIOS loaded
  3458. .TITLE Sublanguage command Q [G]
  3459.  
  3460. This tests to see if CHARBIOS is loaded and reports an error if it
  3461. is not loaded. Also do not perform further sublanguage commands
  3462. in this sequence.
  3463.  
  3464.         eg. Put the following in the SETUP script to abort if not loaded
  3465.  
  3466.         Y;ZZQ;joLOADED
  3467.         PCHARBIOS is not loaded;Q
  3468.         LLOADED
  3469.  
  3470. Also can be used at the start of sequences if you wish to continue
  3471. without actioning sublanguage commands if CHARBIOS is not present.
  3472. (Items which rely on it check for it in any case!).
  3473.  
  3474. .FRAME Use of graphic memory
  3475. .TITLE Graphic save area usage [G]
  3476. The commands G,R,S utilise the same memory as popup notes, menus etc.
  3477. This means that if you are displaying something in a note, it should
  3478. be displayed from a named variable (eg. LTP^picture.hgp) and NOT from
  3479. a file, otherwise the popup will be lost and the screen will be
  3480. refreshed when it is popped down.  Also, an image to be displayed in a
  3481. note should not be compressed, otherwise it will be expanded to the
  3482. general save area.
  3483.  
  3484. .FRAME Default display command
  3485. .TITLE Sublanguage command 1 [G]
  3486.  
  3487. This permits the default image display string to be specified
  3488.  
  3489.         ZZ1^LTP
  3490.  
  3491. .FRAME Auto-purge pattern
  3492. .TITLE Sublanguage command 2 [G]
  3493.  
  3494. When the program runs out of memory to allocate, it tries to delete
  3495. named variables matching a specified pattern.  The default pattern is
  3496. \#* which matches all names starting with a '#' character.
  3497.  
  3498. It is useful to use lowercase names for graphic resources loaded on a
  3499. temporary basis, and then set the following pattern for the auto-purge
  3500. operation to delete these if required:-
  3501.  
  3502.       ZZ2^[a-z]*
  3503. .FRAME Bitmap offset
  3504. .TITLE Sublanguage command + [G]
  3505.  
  3506. The bitmap display command P normally puts the image to screen at a
  3507. character cell boundary. The + command displaces the image
  3508. vertically by a number of pixels. For example
  3509.  
  3510.   LT+3P^image.hgp
  3511.  
  3512. This offsets the image by 3 pixels.
  3513.  
  3514. To move a selected image down two pixels and back again, the
  3515. following sequence can be used:-
  3516.  
  3517.   C+2PZ+0P
  3518. .FRAME Graphic hooks
  3519. .TITLE Built-in graphic triggers [G]
  3520. Font selection - GX hooks
  3521.  
  3522. The following are special built-in font setting variables for display
  3523. transitions. These are named variables defined using the ZV action to
  3524. graphic sublanguage commands.
  3525.  
  3526. GXN      - Font for use in popup note
  3527. GXM      - Font for use in popup menu
  3528. GXT      - Font for use in main text
  3529. GXP      - Font for display of popup note
  3530.  
  3531. eg. ZVGXT=LF^DEFAULT.UDG
  3532.  
  3533. The GXR command is called whenever a reference is selected.
  3534. It can be set to invert the reference as an indication that
  3535. it has been selected.
  3536.  
  3537. eg. ZVGXR=CIPZIP        - invert, pause, invert back
  3538.  
  3539. Mouse cursor selection - GM
  3540.  
  3541. The following variables are built-in hooks, which should be
  3542. defined as for the GX commands above. The sublanguage statements
  3543. in this case should set a mouse cursor.
  3544.  
  3545. GMx where x is one of the standard reference flag letters -
  3546.     A,F,M,S,N or R and causes invocation of the graphic sublanguage
  3547.     string when the mouse cursor moves over a reference of the
  3548.     appropriate type. The local (lowercase) reference flags are mapped
  3549.     to these also.
  3550.  
  3551. GMT This is invoked to reset the mouse cursor to that used for open
  3552.     text, when the mouse moves off a reference.
  3553.  
  3554. eg. ZVGMN=LA^POINT.HMC
  3555.  
  3556. See also:  ~FDo bitmap command~E, ~FDo draw command~E
  3557. .FRAME Draw sublanguage
  3558. .TITLE Action code 'Zz' [G]
  3559. Format:    Zzcommands
  3560.  
  3561. The graphics drawing sublanguage is provided using the 'Zz' action.
  3562. Pixel coordinates are from the top left corner at 0,0. Commands are:-
  3563.  
  3564.   cccc   - colour sequence
  3565.   X      - exclusive or the following commands
  3566.   Hnnn   - set horizontal coord (x)
  3567.   hnnn   - set horizontal coord 2 (x) (default is last coord)
  3568.   Vnnn   - set vertical coord (y)
  3569.   vnnn   - set vertical coord 2 (y)  (default is last coord)
  3570.   P      - set coordinates to mouse pixel coordinates
  3571.   Ldnnncccc   - horiz/vert lines
  3572.         d   = direction
  3573.         nnn = repeat
  3574.         ccc = colour sequence
  3575.  
  3576.   lc     - draw line from coord 2 to specified coord
  3577.         eg. draw green line from last graphic position to 200,100
  3578.             ZzH200V100lG
  3579.  
  3580.   directions
  3581.                 7  8  9
  3582.                  \ | /
  3583.                4 -   - 6
  3584.                  / | \
  3585.                 1  2  3
  3586.  
  3587.   colour sequence
  3588.   -     Colour letters as per HyperShell colour values
  3589.  
  3590.         eg. rrr    is three bright red pixels
  3591.  
  3592.   -     T   - transparent pixel (leave screen pixel as is)
  3593.  
  3594.   -     ,   comma - "carriage return / line feed"
  3595.   -     '   quote - vertical "carriage return / line feed"
  3596.   -     .   point - "carriage return"
  3597.             These allow a sequence of raster lines to be drawn
  3598.             in the required direction
  3599. .FRAME Parameters
  3600. .TITLE passing data into scripts and notes
  3601. The actions t,N,n,c,S,s and the @t,@N,@n modifiers can have a
  3602. parameter string added in parentheses afterwards as follows:-
  3603.  
  3604.    Sscript(parameters)
  3605.  
  3606. The string in parentheses is assigned to variable $$\, and can be
  3607. used as such in the note or script. In a script, it can be split
  3608. up on a separator using action 'e'. If the script is called with:-
  3609.  
  3610.    Shelp(contents,12,file.txt)
  3611.  
  3612. Then this may be split into variables in a script using the action
  3613.  
  3614.    e\,abc...
  3615.  
  3616. where a,b,c etc. are the variables to split the string into.
  3617. For the above, this would set a = contents, b = 12, c = file.txt
  3618.  
  3619. The variables can then be used within the script as parameters.
  3620. .
  3621. .FRAME Pattern Match
  3622. .TITLE Extended string comparison and searching
  3623. The Pattern Match operation, used for comparisons and searching,
  3624. compares a string against a pattern. The pattern contains literal
  3625. characters and various pattern specifying 'metacharacters'.
  3626.  
  3627. These metacharacters are as follows:-
  3628.  
  3629.  <             at start - match start of string
  3630.  >             at end - match end of string
  3631.  ?             match any character
  3632.  _             match one or more space or TAB characters
  3633.  (alt1/alt2)   match alt1 or alt2 (if only one, it is optional)
  3634.  [abc]         match 'a', 'b' or 'c'
  3635.  [^abc]        match any character but 'a','b' or 'c'
  3636.  [x-y]         match any character in range x to y
  3637.                e.g. [a-zA-Z] would match any letter
  3638.  {             start of word
  3639.  }             end of word
  3640.  x#            zero or more of the character or subexpression x
  3641.  x+            one or more of the character or subexpression x
  3642.  
  3643.  *             any string (equivalent to ?#)
  3644.  
  3645.  \x            character 'x' (allows metacharacters to be used
  3646.                literally)
  3647.  
  3648. Examples:-
  3649.  
  3650.    [a-zA-Z]#          an alphabetic substring
  3651.    [0-9]#             a numeric substring
  3652.    (perhaps)          optional substring 'perhaps'
  3653.    (cat/dog)(s)       'cat' or 'cats' or 'dog' or 'dogs'
  3654.    ((pine)apple/grape(fruit))
  3655.                       'apple','pineapple','grape', or 'grapefruit'
  3656.  
  3657.     <.FRAME           a string starting '.FRAME'
  3658. .
  3659. .FRAME Menu parameters
  3660. .TITLE Special forms of menu selection
  3661. A number of different selection methods can be used to
  3662. select items from menus, other by presenting the menu to the
  3663. user for selection.
  3664.  
  3665. ~X1[1]  ~FArray selection~K1~E - to use a menu as an array
  3666.  
  3667. ~X1[2]  ~FLookup selection~K2~E - to use a menu as a lookup table
  3668.  
  3669. ~X1[3]  ~FZone selection~K3~E - to use a menu for graphic zone actions
  3670. .
  3671. .FRAME Array selection
  3672. .TITLE Using a menu as an array
  3673. Special forms of menu action specification are used to permit
  3674. selection of a menu option from global, local and file menus,
  3675. specified as actions or dynamic menus. The following form
  3676. is used to select a menu choice by index:-
  3677.  
  3678.    Mmenuname(nn)
  3679.  
  3680. Where nn is a number representing the option number in the menu to
  3681. select. If the number is outside the range of the menu, no action
  3682. is performed (or is returned for an action modifier), and the error
  3683. status is set.
  3684.  
  3685.    P@Merror message(4)    - Pops up line 4 of menu 'error message'
  3686. .
  3687. .FRAME Lookup selection
  3688. .TITLE Menus as lookup tables
  3689. A menu can also be used as a lookup table. The menu is then
  3690. accessed by a specification of the form:-
  3691.  
  3692.    Mmenuname[key]
  3693.  
  3694. In this case, the lines in the menu section have to be set up in
  3695. the following form:-
  3696.  
  3697.    key|action
  3698.  
  3699. Where key is the key to look up, and action is the action to perform
  3700. if a match is found. The '|' character has to immediately follow the
  3701. key string for this to work. If the key is not found in the menu, no
  3702. action is performed and the error status is set. If the key is found,
  3703. the action part is returned as the menu result. The last line of a
  3704. lookup table menu can be of the form:-
  3705.  
  3706.     *|default action
  3707.  
  3708. This action is performed if the key is not found in the other options.
  3709. .
  3710. .FRAME Zone selection
  3711. .TITLE Mapping an action to a selection zone
  3712. The form Mmenuname[@] is used for zone selection menus used with
  3713. graphic displays. The menu options in this case are set up using
  3714. the graphics preparation facilties described in the operation
  3715. guide. They can also be set up manually, and have the following
  3716. form:-
  3717.  
  3718. kXYxy|returnval
  3719.  
  3720. where k is the key mapping and XY and xy are the top left and
  3721. bottom right corners of the selection zone. Returnval is the
  3722. value returned by menu, as usual. XxYy are single characters
  3723. equal to ASCII 32 + the column/row number (similar to those
  3724. used in ANSI escape sequences on terminals). If a RETURN key
  3725. or left mouse button is pressed, the zone coordinates are
  3726. searched. If any other key is pressed, the key mappings are
  3727. searched.
  3728.  
  3729. A default entry can be placed at the end of the menu using an
  3730. option of the form:-~G
  3731.  
  3732. *....|default action
  3733.  
  3734. Because the menu is searched in sequence from to to bottom,
  3735. selection zones can overlap, as the selection priority is
  3736. determined by the sequence. The zone 'on top' or 'in front'
  3737. should come before the one behind. The graphics preparation
  3738. facilities build the list from the start, so highest priority
  3739. zones should be specified first. Of course, the list can be
  3740. edited afterwards if the zones are in the wrong order.
  3741. .
  3742. .PRINT SECTION 5.
  3743. .
  3744. .PRINT TITLE
  3745. Reference Guide - Action modifiers
  3746. .
  3747. .PRINT PAGE
  3748. .
  3749. .FRAME Action Modifier functions
  3750. .TITLE Section - Functions to modify actions
  3751. The action may have its parameter string supplied indirectly via an
  3752. action modifier, or the first character supplied directly and the
  3753. rest supplied indirectly. The action modifier argument string may
  3754. contain variable tokens, which are expanded prior to evaluation.
  3755. The result of the action modifier can optionally be further
  3756. formatted via ~Fpattern strings~E. The resulting parameter string then
  3757. has any ~Fvariable token specifiers~PFexpansion of variables~E expanded prior to being applied
  3758. to the action. Action modifiers are as follows:-
  3759.  
  3760. ~X1[1]    ~FPrompt Function~K1~E            Ask for string
  3761. ~X1[2]    ~FRead and Lookup functions~K2~E    From file
  3762. ~X1[3]    ~FEnvironment variable~K3~E        As SET by DOS
  3763. ~X1[4]    ~FExpression evaluation~K4~E        Arithmetic
  3764. ~X1[5]    ~FString functions~K5~E        Miscellaneous
  3765. ~X1[6]    ~FDynamic menu functions~K6~E        Menus and selections
  3766. .
  3767. .FRAME Prompt function
  3768. .TITLE Modifier code ?
  3769. ~X1Format:    ?prompt string
  3770.       ?prompt string/default
  3771.  
  3772. The prompt modifier allows a string to be requested from the user.
  3773. 'prompt string' is a string which is used as a prompt to the user.
  3774. The input response will form the resulting parameter. If the first
  3775. character of the prompt is a ':', the input response is not echoed
  3776. to the user, allowing passwords and other confidential material to
  3777. be input.
  3778.  
  3779.      Vn?Enter your name    - loads input string to variable 'n'
  3780.  
  3781. A  string  can be provided for editing by appending a string to the
  3782. prompt modifier. When this is done, the cursor is placed at the
  3783. end of the string ready for editing. This can be used to provide
  3784. defaults or to modify the previous value of a variable:-
  3785.  
  3786.       Vc?Delete disk/Y
  3787.  
  3788.       Vj?Enter name/$$j
  3789. .
  3790. .FRAME Read and Lookup functions
  3791. .TITLE Modifier codes !,!F,!L,!B,!P,!S,!N
  3792. ~X1Format:     !{F|L|B}{key}
  3793.        !Pnnnn
  3794.        !{S|N}key
  3795.  
  3796. These functions perform read and search operations on the input
  3797. file (opened by an 'r' action). The modifier for a file read is
  3798.  
  3799.    !F{key}
  3800.  
  3801. Where {key} is an optional key string, which is compared against
  3802. the start of each record read until a match is found. The
  3803. comparison is case insensitive. If '!' or '!F' appears on its own,
  3804. it returns the next line read from the input file. Any search
  3805. starts immediately after the last record read. The modifier
  3806.  
  3807.    !L{key}
  3808.  
  3809. Causes the file to be rewound prior to the search taking place.
  3810. The EOF status is set if the end of file is reached.
  3811. ~G
  3812.    !Bkey
  3813.  
  3814. Provides a very fast search of a text file sorted in ascending
  3815. order. The file can be sorted using the DOS SORT command.
  3816.  
  3817. The fast search CANNOT be used on compressed files.
  3818.  
  3819.    !Pnnnn
  3820.  
  3821. Positions at byte position nnnn in file and returns line
  3822. starting at that position.
  3823.  
  3824.    !Skey
  3825.    !Nkey
  3826.  
  3827. Searches for 'key' in file, starting at beginning of file for
  3828. the !S variant, and at the current record for the !N variant.
  3829. The key can be anywhere in the record.
  3830. .
  3831. .FRAME Directory functions
  3832. .TITLE Modifier code !D
  3833. ~X1Format:     !Dwildcard
  3834.        !D
  3835.  
  3836. These functions allow the file names of files selected using the
  3837. wildcard pattern to be accessed. The wildcard specification is
  3838. used first to select the first file matching the wildcard. The
  3839. specification without the wildcard is then used to step through
  3840. the matching filenames. The EOF status is set when there are no
  3841. more files matching the specification.
  3842.  
  3843. The directory functions do not affect the currently open files,
  3844. and it is possible to open, read and close each file in turn.
  3845.  
  3846. ~X1Example:
  3847.  
  3848.     !D*.HYP            - get first hyperfile name
  3849.     !D            - get next filename
  3850. .
  3851. .FRAME Noted references
  3852. .TITLE Modifier code !R and !C
  3853. ~X1Format:    !{R|C}{key}
  3854.  
  3855. The noted references, set up using the INS key or the 'H'
  3856. action, can be obtained using the modifier:-
  3857.  
  3858.    !R{key}
  3859.  
  3860. The {key}, if present, causes the references to be scanned for the
  3861. next one starting with the key string. For example:-
  3862.  
  3863.    !RF
  3864.  
  3865. returns the next frame reference.
  3866.  
  3867. Any search or step is taken from after the last reference obtained.
  3868. The scan pointer is reset whenever a reference is added or removed
  3869. from the list, and can be rewound with a dummy 'remove' action:-
  3870.  
  3871.    h
  3872.  
  3873. The EOF status is set when the end of the references is reached.
  3874.  
  3875. The comment associated with the next reference to be read by
  3876. the !R modifier can be obtained using the modifier:-
  3877.  
  3878.     !C
  3879.  
  3880. eg. to get next comment in 'c' and reference in 'r':-
  3881.  
  3882.     Vc!C    
  3883.     Vr!R
  3884. .
  3885. .FRAME Environment Variable
  3886. .TITLE Modifier code %
  3887. ~X1Format:    %variablename
  3888.  
  3889. An environment variable modifier returns the value of a DOS
  3890. environment variable. This variable is set using the SET command
  3891. under DOS, or using the ~FSet environment variable~E action in
  3892. HyperShell.
  3893.  
  3894.      Vf%FORMAT    - load value of 'FORMAT' into variable 'f'
  3895.  
  3896. The e.v. was set using a DOS command of the form:-
  3897.  
  3898.      SET FORMAT=DDMMYY
  3899. .
  3900. .FRAME Expression evaluation
  3901. .TITLE Modifier code =
  3902. ~X1Format:     =expression
  3903.  
  3904. An expression evaluation modifier returns the result of an
  3905. expression. An expression can consist of simple integer arithmetic
  3906. operations, boolean expressions, or a combination of both.
  3907.  
  3908. An integer expression can involve the simple arithmetic operators
  3909.  +,-,*,/,% and can use parentheses to direct order of evaluation.
  3910. The % operator returns the remainder of a division.
  3911.  
  3912. The expression can involve integer values and alphabetic variable
  3913. names (used directly without the $$ token). 32-bit signed integers
  3914. are used in the evaluation of the expression.
  3915.  
  3916. e.g. to calculate a value and assign it to the variable 'c':-
  3917.  
  3918.    Vc=(22*r*2)/7
  3919. ~G
  3920. The arithmetic bit operations ! & and ^ represent OR AND and
  3921. EXCLUSIVE OR. For example:-
  3922.  
  3923.     2 ! 3    -> 3
  3924.     2 ^ 3    -> 1
  3925.     2 & 3    -> 2
  3926.  
  3927. Boolean expressions can be made up from the following operators,
  3928. each returning a 1 if true or a 0 if false.
  3929.  
  3930.    = or ==    equality of comparands
  3931.    ~~=        inequality of comparands
  3932.    < > <= >=    left operand less than, greater than, less than
  3933.         or equal, greater than or equal
  3934.    #c        truth of ~Fcondition~PFConditions~E 'c'
  3935.    "xstring"c    combined variable comparison and condition truth
  3936. ~G
  3937. Boolean conditions can be combined using the bit operators to
  3938. form compound conditions:-
  3939.  
  3940.    (a == 3) ! (a == 4)     evaluates true if a = 3 or 4
  3941.  
  3942. The condition flags are set after an expression evaluation as
  3943. though the result had been compared against zero. For an arithmetic
  3944. evaluation a negative result is tested using the condition flag 'l'.
  3945.  
  3946. The combined variable string comparison and condition truth
  3947. boolean is effectively a string comparison, with the added power
  3948. of the extra substring and ~Fpattern match~E condition codes. The
  3949. 'xstring' forms the parameter for an implicit ~FTest variable~A
  3950. action, with 'x' being a variable and 'string' being a comparand.
  3951. The condition codes are set accordingly, and the boolean returns
  3952. the truth of the specified condition code 'c'.
  3953. ~G
  3954. For a boolean expression, the 'n' condition code is set for a TRUE
  3955. result and a 'e' condition code for a FALSE result (this may seem
  3956. counter intuitive at first). The ~FQuick conditional~E expression
  3957. testing action can be used for convenient testing of boolean
  3958. expressions.
  3959.  
  3960. The triadic conditional choice expression is of the form:-
  3961.  
  3962.   expr?true expr:false expr
  3963.  
  3964. e.g.
  3965.  
  3966.   a<3?45:78
  3967.  
  3968.     - if variable a less than 3 return 45 else return 78
  3969.  
  3970. Each expression may be of the full expression form. Nested triadics
  3971. are therefore possible, but should be enclosed in parentheses.
  3972. .
  3973. .FRAME String Functions
  3974. .TITLE Modifier code &
  3975. ~X1Format:     &FParg
  3976.  
  3977. There are a number of functions which return a string or a number.
  3978. In the general form shown above, 'F' is the function code, 'P' is
  3979. an optional parameter and 'arg' is the argument string to apply
  3980. the function against.
  3981.  
  3982. ~X1[1]    ~FList of string functions~PA@C4Function~K1~E
  3983. .
  3984. .FRAME ASCII value of character
  3985. .TITLE Function code A
  3986. The 'A' function returns the ASCII value of the first character of
  3987. the remaining string, and is the same as the BASIC ASC() function.
  3988.  
  3989.    &AA
  3990.  
  3991. returns '65', as this is the ASCII decimal code for 'A'
  3992. .
  3993. .FRAME Nth frame
  3994. .TITLE Function code a
  3995. Format:  &annn
  3996.  
  3997. The '&a' function returns the name of the nnnth frame in the
  3998. current hyperfile.
  3999.  
  4000. eg.
  4001.  
  4002.       F&a12               - display 12th frame in hyperfile
  4003. .
  4004. .FRAME Scale number
  4005. .TITLE Function code B
  4006. The 'B' function is used to format numeric variables for
  4007. display with decimal places. It takes the next character
  4008. as the number of decimal places to display.
  4009.  
  4010.   &Bpvalue
  4011.  
  4012. returns 'value' with 'p' decimal places.
  4013.  
  4014.   &B212345       -  returns 123.45
  4015.  
  4016.   &B312          -  returns 0.012
  4017. .
  4018. .FRAME Graphic information
  4019. .TITLE Function code b [G]
  4020. Format:  &bc
  4021.  
  4022. The b function gets graphic information at the pixel resolution.
  4023. The parameter c can have the following values:-
  4024.  
  4025.      x     graphic x coord
  4026.      y     graphic y coord
  4027.      X     mouse x coord
  4028.      Y     mouse y coord
  4029.      M     current mode (as set by ZM action)
  4030.      C     character cell height
  4031. .FRAME Character of code
  4032. .TITLE Function code C
  4033. The 'C' function returns the character equivalent to the ASCII
  4034. value provided by the remaining string, which is expected to be
  4035. numeric, and is the same as the BASIC CHR$$() function.
  4036.  
  4037.    &C66
  4038.  
  4039. returns 'B', as this is the character with ASCII code 66
  4040. .
  4041. .FRAME External function
  4042. .TITLE Function code c
  4043. The 'c' function passes its argument to a Resident Extension,
  4044. if there is one installed, and returns the result string.
  4045.  
  4046. For example, using the hrxfp floating point extension
  4047.  
  4048.   &c10/4          returns 2.5
  4049. .
  4050. .FRAME Display adaptor code
  4051. .TITLE Function code D
  4052. The 'D' function returns a single digit representing the type
  4053. of display adaptor currently in use. Codes returned are:-
  4054.  
  4055. 0       CGA adaptor
  4056. 1       Monochrome or Hercules adaptor
  4057. 2       EGA adaptor
  4058. 3       VGA adaptor
  4059.  
  4060. This ~sbutton~E displays the current monitor type
  4061. .
  4062. .SCRIPT button
  4063. VT&D
  4064. VT=T+1
  4065. P@mAdaptor($T)
  4066. .
  4067. .MENU Adaptor
  4068. CGA
  4069. Monochrome
  4070. EGA
  4071. VGA
  4072. .
  4073. .FRAME String of character
  4074. .TITLE Function code 'd'
  4075. ~X1Format:    &dxnn
  4076.  
  4077. The 'd' function returns a string of length nn containing
  4078. character 'x's.
  4079.  
  4080.    eg. to return a string of 15 equals signs:-
  4081.  
  4082.    Ve&d=15
  4083.  
  4084. This could be used for a number of purposes, for instance
  4085. in a frame display to show a bar graph representing the
  4086. values of variables:-
  4087.  
  4088.    People     : $(&d#$p)
  4089.  
  4090. if variable p contains 12, this would display as:-
  4091.  
  4092.    People     : ############
  4093. .FRAME Extended key mapping
  4094. .TITLE Function code E
  4095. This function works as for the ~FM function~PFString mapped to key~E.
  4096. The extended mapping function &Eks should be used for function
  4097. key mappings, as 'ks' is specified as for action K.
  4098.  
  4099.     &EF8
  4100.  
  4101. returns the action string mapped to function key 8
  4102. .
  4103. .FRAME Edit text
  4104. .TITLE Function code e
  4105. ~X1Format: &enn
  4106.  
  4107. The 'e' function permits the text on the screen at the current
  4108. text cursor location, of length nn, to be edited for input,
  4109. the result being returned.
  4110.  
  4111. This function is intended for specifying dynamic form fill
  4112. fields.
  4113.  
  4114. For example, to put a prompt on the screen and then input
  4115. a string, allowing a default, the following actions are used.
  4116.  
  4117.    i~~X10~~Y15Name : ~~DI$n~~W20~~X17~~c;Vn&e20
  4118.  
  4119. Note that ~~c is used to keep the text cursor on the same line.
  4120.  
  4121. CAUTION: This function should be used with care
  4122. .
  4123. .FRAME Substring from
  4124. .TITLE Function code F
  4125. The 'F' function takes the next character as a search argument, and
  4126. returns the substring from, and including, the located character,
  4127. or the full string if this is not found.
  4128.  
  4129.    &Fdabcdefg
  4130.  
  4131. returns 'defg', as this is the part of 'abcdefg' starting with 'd'
  4132. .
  4133. .FRAME Get key with timeout
  4134. .TITLE Function code G
  4135. The 'G' function takes the supplied numeric string as a
  4136. timeout period in hundredths of a second. It then awaits
  4137. a key depression and either returns the character pressed,
  4138. or a null string if the timeout occurs. The character can
  4139. be fed back as key input using the ~FUnget key code~E
  4140. action, for use in selections from frame displays etc.
  4141.  
  4142.    Vn&G300         - this waits 3 seconds for a key press
  4143.                      and loads it into 'n', or times out.
  4144. .
  4145. .FRAME Get text from screen
  4146. .TITLE Function code g
  4147. Format:     &gnn
  4148.  
  4149. The 'g' function returns the text of nn characters from the
  4150. current text cursor position.
  4151.  
  4152. This can be used with the other direct input and output
  4153. commands (~FInsert text~E and ~FInput from screen~E) to copy text
  4154. from the screen for use elsewhere.
  4155. .
  4156. .FRAME Time of day
  4157. .TITLE Function code H
  4158. The 'H' function returns the time of day as hundredths of
  4159. a second. This can be used to time long periods of activity.
  4160. Short periods can be timed using the ~FDelta time~E function.
  4161.  
  4162.    &H
  4163.  
  4164. returns time of day.
  4165. .
  4166. .FRAME Add matching frames to notepad
  4167. .TITLE Function code 'h'
  4168. ~X1Format:    &hcomment
  4169.  
  4170. The 'h' function adds all frames matching the last search to
  4171. the notepad list, with comment 'comment'.
  4172.  
  4173.     eg. Y&hSecond set
  4174.  
  4175. The function returns nothing of value.
  4176. .FRAME Index of character
  4177. .TITLE Function code I
  4178. The 'I' function takes the next character as a search argument, and
  4179. returns the index of this character within the remaining string, or
  4180. zero if it is not found. This is similar to the BASIC INSTR()
  4181. function, but only deals with a single character search argument.
  4182.  
  4183.    &Icabcdef
  4184.  
  4185. returns '3', as 'c' is the third letter in 'abcdef'
  4186. .
  4187. .FRAME Input from screen
  4188. .TITLE Function code i
  4189. ~X1Format: &i{default}
  4190.  
  4191. The 'i' function permits a string to be input at the current
  4192. text cursor location, with an optional default value supplied.
  4193.  
  4194. This function is intended for direct screen I/O in conjunction
  4195. with the 'i' action, and possibly with windows defined using
  4196. the ~~b2 and ~~b3 flags.
  4197.  
  4198. For example, to put a prompt on the screen and then input
  4199. a string, allowing a default, the following actions are used.
  4200.  
  4201.    i~~X10~~Y3Enter name: ~~c
  4202.    Vn&iFred
  4203.  
  4204. CAUTION: This function should be used with care
  4205. .
  4206. .FRAME Delta time
  4207. .TITLE Function code J
  4208. The 'J' function returns the time since the last call to
  4209. function 'J', function 'G', function 'H' or the last frame
  4210. display in hundredths of a second. It can be used to time
  4211. certain events, such as the time taken to select from a menu
  4212. or a frame.
  4213. .
  4214. .FRAME Frame index
  4215. .TITLE Function code j
  4216. Format:  &jframe name
  4217.  
  4218. The '&j' function returns the index of the named frame in the
  4219. current hyperfile.
  4220.  
  4221. eg.
  4222.  
  4223.       &jintroduction      - returns 1 ('introduction' is first frame)
  4224. .
  4225. .FRAME Prompted key input
  4226. .TITLE Function code K
  4227. The 'K' function takes the remaining string as a popup message,
  4228. awaits a key depression, and returns the character for the key
  4229. pressed. This is similar to the BASIC INKEY$$() function.
  4230.  
  4231.    &KPress Y or N
  4232.  
  4233. could return 'Y' or 'N' (or any character typed in response)
  4234. .
  4235. .FRAME Clear local flags globally
  4236. .TITLE Function code k
  4237. ~X1Format:    &kc
  4238.  
  4239. The 'k' function code clears the local flag given as argument
  4240. in all frames in the current hyperfile.
  4241.  
  4242.    eg. Y&k/     clear search match flags
  4243.        Y&k2     clear local flag 2 in all frames
  4244.  
  4245. The function does not return anything useful.
  4246.  
  4247. .FRAME Length of string
  4248. .TITLE Function code L
  4249. The 'L' function returns the length of the remaining text string in
  4250. the action, and is the same as the BASIC LEN() function.
  4251.  
  4252.    &Labc
  4253.  
  4254. returns '3', as there are three letters in 'abc'
  4255. .
  4256. .FRAME Length of hyperfile
  4257. .TITLE Function code l
  4258. Format:  &l                                 (HI.EXE ONLY)
  4259.  
  4260. The '&l' function returns the length of the current hyperfile.
  4261. .
  4262. .FRAME String mapped to key
  4263. .TITLE Function code M
  4264. The 'M' function takes the next character as a key character, and
  4265. returns the string mapped to that character (using the 'K' action),
  4266. or a null string if nothing is mapped.
  4267.  
  4268.    &Mh
  4269.  
  4270. could return 'NHelp', if the mapping action 'K#hNHelp' was in effect
  4271. .
  4272. .FRAME Name given title
  4273. .TITLE Function code m
  4274. Format:  &mstring
  4275.  
  4276. The '&m' function returns the name of the frame with a title
  4277. containing 'string'.
  4278.  
  4279. eg.
  4280.  
  4281.       &mstructure        - returns 'File contents' (in HSREF.HYP)
  4282. .
  4283. .FRAME Indexed character
  4284. .TITLE Function code N
  4285. The 'N' function takes the next character as a numeric argument
  4286. specifying an index into the string. The character indexed in the
  4287. string is returned as the result of the function.
  4288.  
  4289.    &N4abcdef
  4290.  
  4291. returns 'd', as this is the 4th letter of 'abcdef'
  4292.  
  4293. Functions &u, &S and &N can now have a single letter variable name
  4294. specified in place of the single digit position (length) field.  The
  4295. contents of the variable are then used as the position (length), and
  4296. can exceed the limit of 9 otherwise enforced by the single digit.
  4297. eg.  to return the 15th character of a string:-
  4298.  
  4299.   Vx15
  4300.   Vc&Nxabcdefghijklmnopqrstuvwxyz
  4301.       ^--- variable x contains 15, therefore 15th character returned
  4302. .
  4303. .FRAME Frame page number
  4304. .TITLE Function code n
  4305. The '&n' function code returns the current page number of the
  4306. current frame.
  4307.  
  4308. This can be used to log the current position in the frame. 
  4309.  
  4310. Eg. for a three page frame, on the third page,
  4311.  
  4312.      Vp&n       stores 3 in variable p
  4313. .
  4314. .FRAME Application option setting
  4315. .TITLE Function code O
  4316. The 'O' function takes application flag specification following
  4317. and returns the character mapped to that flag.
  4318.  
  4319.      &OA
  4320.  
  4321. would return the character setting of flag 'A' (set via action O*A)
  4322. .
  4323. .FRAME Attribute value of scheme
  4324. .TITLE Function code o
  4325. ~X1Format:    &oX
  4326.  
  4327. Function 'o' returns a numeric value associated with colour
  4328. scheme X.  This value represents the colour attributes for the
  4329. scheme and may be used in the revised scheme setting action,
  4330. which can accept a numeric value. Thus, it is possible to save
  4331. the colour settings as a file which can be used as a script to
  4332. restore the settings.
  4333. .FRAME Pick word
  4334. .TITLE Function code P
  4335. The 'P' function returns the word or number over which the mouse
  4336. cursor is positioned. This can be used for direct selection or
  4337. prompted selection of words. If any character follows the &P,
  4338. the word is echoed at wherever the text cursor is positioned.
  4339.  
  4340.     K#nN&P
  4341.  
  4342. When the 'n' key is pressed with the mouse positioned on a word,
  4343. this pops up a global note, if there is one, about the word.
  4344.  
  4345.     pSelect word to search for
  4346.     P
  4347.     A@S&P
  4348.  
  4349. This prompts for the selection, issues a null popup message
  4350. to await mouse selection with any key, then searches for the
  4351. selected word in the frame titles.
  4352. .
  4353. .FRAME Typed file details
  4354. .TITLE Function code p
  4355. Format: &pn
  4356.  
  4357. The 'p' function returns details about the current or previous
  4358. file which was typed using the ~FDisplay text file~E action.
  4359.  
  4360. The parameter 'n' may have the following values:-
  4361.  
  4362.     0 - returns 1 if file still available, else 0
  4363.     1 - returns current page number ?
  4364.     2 - returns current maximum page number ?
  4365.     3 - returns end of file page number or 999 if not reached ?
  4366.  
  4367. See Also: ~FTyped file name~E
  4368. .
  4369. .FRAME Pick reference
  4370. .TITLE Function code Q
  4371. The 'Q' function returns the action string for the reference over
  4372. which the mouse cursor is positioned, or a null string if not
  4373. over a reference. This can be used for processing the action in
  4374. other ways than executing it, when selected using a key other
  4375. than the Return key.
  4376.  
  4377.     &Q            - returns the reference action
  4378.  
  4379.     &Qn           - return first n characters of action
  4380.  
  4381.     The &Q function can have a single digit length field added, which
  4382.     restricts the returned value to the specified length. This is for
  4383.     use in the help message line system described elsewhere.
  4384. .
  4385. .FRAME Run option
  4386. .TITLE Function code R
  4387. The 'R' function returns the numeric value of one of the run
  4388. ~FOptions~E or ~FExtended Options~E. It takes a numeric parameter
  4389. equal to the option number (plus 10 for extended options).
  4390.  
  4391.     &R17                  - returns the tab stop width.
  4392.  
  4393.     &R4                   - returns the autoreference setting
  4394.  
  4395. Also for codes 20 onwards:-
  4396.  
  4397.  20 returns 1 if -s was specified on the command line
  4398.  21 returns 0 if -m was specified and 1 if not.
  4399.  22 returns the number of input files open using 'r'
  4400.  23 returns the number of output files open using 'w'
  4401.  24 returns 1 if U.K. date format, 0 if U.S. date format
  4402.  25 returns the number of frames listed in the
  4403.                 last search operation or contents list
  4404. .
  4405. .FRAME Read position
  4406. .TITLE Function code r
  4407. The 'r' function returns the byte position in the current input
  4408. file. This can be used to provide a direct access mechanism
  4409. using the !P function to subsequently position here.
  4410. .
  4411. .FRAME Substring indexed
  4412. .TITLE Function code S
  4413. The 'S' function takes the next character as a numeric argument
  4414. specifying an index into the string. The substring indexed in the
  4415. string is returned as the result of the function. This is similar
  4416. to a variant of the BASIC MID$$() function.
  4417.  
  4418.    &S4abcdef
  4419.  
  4420. returns 'def', as this is the substring starting at the 4th
  4421. character of 'abcdef'.
  4422. .
  4423. .FRAME Local flag mask
  4424. .TITLE Function code s
  4425. Format:  &sframe name
  4426.  
  4427. The '&s' function returns the local flag mask of the named frame
  4428. in the current hyperfile.
  4429.  
  4430. eg.
  4431.  
  4432.     &sintroduction      - returns the mask for frame 'introduction'
  4433. .
  4434. .FRAME Frame title string
  4435. .TITLE Function code T
  4436. The 'T' function takes the remaining string as a frame name, and
  4437. returns the title string for that frame.
  4438.  
  4439.    &TFrame title string
  4440.  
  4441. would return 'Function code T'
  4442. .
  4443. .FRAME Typed file name
  4444. .TITLE Function code t
  4445. Format: &t
  4446.  
  4447. The 't' function returns the filename of the current or previous
  4448. file which was typed using the ~FDisplay text file~E action.
  4449.  
  4450. See Also: ~FTyped file details~E
  4451. .
  4452. .FRAME Substring upto
  4453. .TITLE Function code U
  4454.  
  4455. The 'U' function takes the next character as a search argument,
  4456. and returns the substring up to, but not including, the located
  4457. character, or a null string if this is not found.
  4458.  
  4459.    &Udabcdefg
  4460.  
  4461. returns 'abc', as this is the substring of 'abcdefg' up to,
  4462. but not including, the letter 'd'.
  4463. .
  4464. .FRAME Upto nth character
  4465. .TITLE Function code u
  4466. The 'u' function takes the next character as a length,
  4467. and returns the substring up to, and including, the length
  4468. specified, or the whole string if it is shorter than n.
  4469.  
  4470.    &u4abcdefg
  4471.  
  4472. returns 'abcd', as this is the first 4 characters of 'abcdefg'.
  4473. .
  4474. .FRAME Configuration string value
  4475. .TITLE Function code V
  4476.  
  4477. The 'V' function takes the numeric argument as a ~Fconfiguration~E
  4478. string index and returns the string configured to that value
  4479.  
  4480.      &V56
  4481.  
  4482. would return the date format string
  4483. .
  4484. .FRAME Variable address
  4485. .TITLE Function code v
  4486. ~X1Format:  &vx
  4487.  
  4488. The 'v' function returns a string representing the segment and
  4489. offset address of the variable 'x', in a form usable by an
  4490. external program, so that the variable may be accessed.
  4491.  
  4492. The form of the string is two hexadecimal numbers separated by
  4493. a colon, as follows:-
  4494.  
  4495.     SSSS:OOOO
  4496.  
  4497. This string can be assigned to a variable and used in a command
  4498. line of an invoked program. This can then access and modify the
  4499. variable if it decodes the address first. If a variable is to
  4500. receive data, it must be large enough for that data, otherwise
  4501. information will be overwritten, with unpredictable results.
  4502.  
  4503. CAUTION: This function should be used with extreme care
  4504. .
  4505. .FRAME Whole string
  4506. .TITLE Function code W
  4507.  
  4508. The 'W' function returns the whole supplied string.
  4509.  
  4510. This is used to permit action modifier characters to be included
  4511. in the initial few characters of action strings.
  4512.  
  4513.      P&W?Hello
  4514.  
  4515. would popup the string '?Hello'
  4516.  
  4517. whereas
  4518.  
  4519.      P?Hello
  4520.  
  4521. would prompt for a string with 'Hello' and then pop it up
  4522. .
  4523. .FRAME Details of last reference selected
  4524. .TITLE Function code w
  4525. ~X1Format:    &wn
  4526.  
  4527. Function w returns details of the last reference selected.
  4528. The argument 'n' can have the following values:-
  4529.  
  4530.       0 - ASC val of reference type
  4531.       1 - ref start column
  4532.       2 - ref line number
  4533.       3 - ref column after end
  4534.       4 - ASC val of key mapping
  4535.       5 - [G] depth of reference in character rows
  4536.  
  4537. For notes, column and line positions are for whole screen,
  4538. and not relative to top left of note.
  4539.  
  4540. Results are unpredictable if a reference has not been selected.
  4541. .FRAME Graphic X coordinate
  4542. .TITLE Function code X
  4543.  The 'X' function returns the column number of the mouse
  4544.  cursor when a button was pressed during the last graphic
  4545.  display.
  4546. .
  4547. .FRAME Text cursor column
  4548. .TITLE Function code x
  4549. The '&x' function returns the current text cursor column.
  4550.  
  4551. The text cursor is used to write text to the screen, and is
  4552. affected by frame and note displays, and by the ~FInsert text~E
  4553. action.
  4554. .
  4555. .FRAME Graphic Y coordinate
  4556. .TITLE Function code Y
  4557.  The 'Y' function returns the line number of the mouse
  4558.  cursor when a button was pressed during the last graphic
  4559.  display.
  4560. .
  4561. .FRAME Text cursor line
  4562. .TITLE Function code y
  4563. The '&y' function returns the current text cursor line.
  4564.  
  4565. The text cursor is used to write text to the screen, and is
  4566. affected by frame and note displays, and by the ~FInsert text~E
  4567. action.
  4568. .
  4569. .FRAME Graphic key press
  4570. .TITLE Function code Z
  4571.  The 'Z' function returns the key pressed during the last
  4572.  graphic display.
  4573. .
  4574. .FRAME Details of last graphic
  4575. .TITLE Function code z [G]
  4576. ~X1Format:     &zc
  4577.  
  4578. Function &zn returns information about the last graphic displayed
  4579. using the ZZ or reference variants of the graphics sublanguage, or
  4580. popped back from a popup item. The parameter n is an index into the
  4581. graphic image header.
  4582.  
  4583.     &z0 - should have a value of 127
  4584.     &z1 - character cell depth for image (8,14 or 16)
  4585.     &z2 - left column  \
  4586.     &z3 - top row      / These give the top left corner position
  4587.     &z4 - width in character cells
  4588.     &z5 - depth in character cells
  4589. .FRAME Convert string
  4590. .TITLE Function code #
  4591. ~X1Format: &#vconv
  4592.  
  4593. The function '#' performs string conversion on the variable
  4594. 'v' according to the conversion string 'conv'.
  4595.  
  4596. The conversion string is taken as a string of directives to
  4597. show the conversion required. Directives can be as follows:-
  4598.  
  4599.     l      - convert to lowercase
  4600.     u      - convert to uppercase
  4601.     s      - strip superfluous spaces
  4602.     tv     - translate according to variable v
  4603.     rv     - remove characters in variable v
  4604.  
  4605. each directive can be made conditional by preceding it with:-
  4606.  
  4607.                       ic
  4608.  
  4609. where c is any condition code letter
  4610.  
  4611.    e.g. i3rr removes characters specified in variable 'r' if
  4612.         frame-local flag 3 is set
  4613.  
  4614. directives and conditional directives can be combined in a
  4615. single string:-
  4616.  
  4617.   e.g.  ls        - convert to lowercase and remove spaces
  4618.  
  4619. So, to convert variable x to lowercase and remove spaces:-
  4620.  
  4621.            Vx&#xls
  4622.  
  4623. The conversion string can be supplied from a variable simply
  4624. by using a variable token.
  4625.  
  4626.   e.g. to use the '~~' variable, the action is:-    Vx&#x$$~~
  4627. .
  4628. .FRAME Dynamic menu functions
  4629. .TITLE Modifier code @
  4630. ~X1Format:    @menuspec
  4631.  
  4632. The dynamic menu specification covers a range of menus and paged
  4633. selections. The selected choice from the dynamic menu becomes the
  4634. resulting string.
  4635.  
  4636. These menus are not necessarily 'dynamic', but the term does apply
  4637. to some of them, and is used collectively for all of them.
  4638.  
  4639. ~X1[1]    ~FList of dynamic menus~PA@C4Menuspec~K1~E
  4640. .
  4641. .FRAME Select backtrack
  4642. .TITLE Menuspec B and b
  4643. The '@B' dynamic menu presents a paged list from which a frame
  4644. can be selected, and returns the backtrack level number. This is
  4645. usually used with the 'b' action to unwind to a frame:-
  4646.  
  4647.     b@B
  4648.  
  4649. The following action will unwind fully to the entry frame
  4650.  
  4651.     b1
  4652.  
  4653. The '@b' dynamic menu presents a paged list from which a frame
  4654. can be selected, and returns the frame reference. This is usually
  4655. used with the 'A' action to revisit a frame without unwinding the
  4656. backtrack list:-
  4657.  
  4658.     A@b
  4659. .
  4660. .FRAME Contents list
  4661. .TITLE Menuspec C
  4662. The contents list menu '@C' presents a paged list of frames in the
  4663. current hyperfile, optionally refined using the variants shown below.
  4664. The contents list returns a frame selection action, and is usually
  4665. used with the 'A' action:-   A@C
  4666.  
  4667. @C0     Is the same as @C, and lists all frames in the hyperfile
  4668. @C1     Lists those frames matched in the last search
  4669. @C2     Lists those frames not matched in the last search
  4670.  
  4671. @C0, @C1 and @C2 can also have a string appended which is used to
  4672. refine the list to those frame names starting with the supplied string.
  4673.  
  4674. @C3string   Lists all frames starting from the first frame name
  4675.             starting with 'string'
  4676. @C4string   Lists all frames with titles starting with 'string'
  4677. @C5string   Lists all frames starting from the first frame with
  4678.             a title starting with 'string'
  4679.    @C4^string and @C5^string do pattern match of string in title
  4680.  
  4681. A@C3$$1     - lists all frames starting at the current frame
  4682. .
  4683. .FRAME Formatted list
  4684. .TITLE Menuspec G
  4685. ~X1Format:    @Gfilename{#page}{/search}
  4686.  
  4687. This is a variant of the ~FDisplay text file~E action, and is used for
  4688. producing formatted listings of files with special character
  4689. separated fields, for instance comma separated fields. The line to
  4690. be displayed is firstly split into a number of variables, then a
  4691. format line with embedded variable tokens is expanded and
  4692. displayed. The parameter specification, and the operation of the
  4693. list is as for the ~FDisplay text file~E action. Any comparisons for
  4694. searches are done done against the original line.
  4695.  
  4696. The ~AG mappings~PFGeneral mapping~E need to be set up before using the @G list.
  4697.  
  4698. KG5    variable split specification
  4699. KG6     selection expression
  4700. KG7    line format template, with variable tokens and
  4701.         two  %c tokens for key mapping
  4702. ~G
  4703. The G5 mapping should be a variable split specification, as for the
  4704. ~FFormatted read~E action, and will cause each line to be split into
  4705. the specified variables before display.
  4706.  
  4707. eg. KG5,abcd   - split line on commas into variables a, b, c and d
  4708.  
  4709. The G6 mapping is a 'selection expression'. This is an expression
  4710. as used in the ZI action. The variables set up by G5 can be tested
  4711. to provide a selection of records to be displayed.  If the
  4712. expression is true, the formatted line is displayed, otherwise the
  4713. record is ignored. Note that it is set to 1 by default as this is
  4714. true for all records, so this key mapping need not be explicitly
  4715. set. This expression is particularly effective with numeric fields,
  4716. and can be used with combination string comparisons for more power.
  4717.  
  4718. eg. KG6(a > 0) & (a < 11)
  4719.  
  4720. display only those records with field 'a' between 1 and 10.
  4721. ~G
  4722. The G7 mapping is a prototype line which is used to format the
  4723. variables and to provide an optional key mapping if reference
  4724. flags are added. Two %c tokens can be included, which will receive
  4725. the key map characters as used in other paged displays. Note
  4726. double dollars are used in the mapping line to delay expansion
  4727. until the display stage. Examples:-
  4728.  
  4729. KG7$$$$a~~C20$$$$b~~C40$$$$c~~C60$$d
  4730.  
  4731. - Simple tabulated list of variables a, b, c, d
  4732.  
  4733. KG7[%c]  ~~A$$$$a~~PSprocess($$$$a)~~K%c~~E ~~C40$$$$b~~C50$$$$c~~C60$$$$d
  4734.  
  4735. - Key mapped list with variable 'a' set as a reference to a script
  4736.   called using the value of 'a' as a parameter.
  4737. .
  4738. .FRAME Directory listing
  4739. .TITLE Menuspec D, d and E
  4740. ~X1Format:    @Dwildcardspec
  4741.  
  4742. The '@D' menu pops up a menu of files matching the wildcardspec,
  4743. and returns the filename selected. No extension is displayed in
  4744. the menu, and no extension is returned.
  4745.  
  4746. The '@d' works as for the '@D' menu, only the file extension is
  4747. included in the menu, and is returned on selection.
  4748.  
  4749. The '@E' works as for the '@D' menu, only the menu presented
  4750. only includes subdirectories.
  4751.  
  4752. The menu return can be used in any action, or dynamic menu,
  4753. requiring a file specification as a parameter.
  4754.  
  4755.       T@d*.TXT       - gives a menu of files with extension .TXT
  4756.                        then displays the file selected
  4757.  
  4758.       C@E*.*         - change to selected directory
  4759. .
  4760. .FRAME Popup menu
  4761. .TITLE Menuspec M,m and F
  4762. ~X1Format:    @Mmenuname
  4763.       @Ffilename
  4764.  
  4765. The popup menus simply present the menu named, and return the
  4766. option selected.
  4767.  
  4768. The '@F' menu uses the contents of a file as the menu.
  4769. The filename specified has a default extension of '.MNU'.
  4770.  
  4771.      Vp@Fprice           - uses PRICE.MNU as a menu
  4772. .
  4773. .FRAME Extended directory
  4774. .TITLE Menuspec L and l
  4775. ~X1Format:     @Lwildcardspec
  4776.        @lwildcardspec
  4777.  
  4778. The extended directory display '@L' presents a paged list
  4779. showing details of the files matching the wildcardspec, in
  4780. a similar fashion to the DOS DIR command. It returns a filename,
  4781. and should be used with an action requiring a filename parameter.
  4782.  
  4783.      G@L*.PIC        - lists all files with an extension .PIC
  4784.  
  4785. The extended directory display with actions added '@l' provides
  4786. its own action strings for typing a text file or changing to a
  4787. directory, and should be used with the 'A' action.
  4788. .
  4789. .FRAME Popup note
  4790. .TITLE Menuspec N,n and t
  4791. ~X1Format:     @Nnotename
  4792.        @tfilename
  4793.  
  4794. The popup note displays return the action string resulting from
  4795. selection of a reference within the note display. These do not
  4796. have to be used as actions, and a note can be used as a fancy
  4797. form of menu which can return any string for any purpose.
  4798. .
  4799. .FRAME Variable menu
  4800. .TITLE Menuspec O
  4801. ~X1Format:    @Oxxxxx
  4802.  
  4803. The named variable popup menu is formed by the set of variables
  4804. starting 'xxxxx'. This may be used to produce a menu at runtime
  4805. from miscellaneous data.
  4806. eg.
  4807.        ZVnames0=Select name
  4808.        ZVnames1=Henry
  4809.        ZVnames2=John
  4810.        ZVnames3=Simon
  4811.        ZVnames4=Albert
  4812.        VN@Onames
  4813.  
  4814.        This builds a menu and presents it for selection, loading
  4815.        teh result into variable N.
  4816. .
  4817. .FRAME Notepad selection
  4818. .TITLE Menuspec R
  4819. ~X1Format:     @R
  4820.  
  4821. The notepad display '@R' is used to display a paged list
  4822. showing the noted references and their associated comments,
  4823. and returns the selected reference action, it is usually
  4824. used with the 'A' action:-
  4825.  
  4826.      A@R
  4827. .
  4828. .FRAME Search selection
  4829. .TITLE Menuspec S,s,X and x
  4830. ~X1Format:    @Ssearch string
  4831.  
  4832. The search operations available are as follows:-
  4833.  
  4834.     Sstring      Search for string in titles of current file
  4835.     sstring      Search for string in titles of open files
  4836.     Xstring      Search for string in titles and texts of current file
  4837.     xstring      Search for string in titles and texts of open files
  4838.  
  4839. The title searches look for the search string in the frame name
  4840. and the title. A search string starting with the '^' character
  4841. indicates that a ~Fpattern match~E search is to be performed, and that
  4842. the remaining string forms the pattern. The search menus normally
  4843. return a frame selection action, but may also return other reference
  4844. actions. They should be used with the 'A' action:-
  4845.  
  4846.     A@S?Enter search string
  4847.  
  4848. The list of matches produced can be used for immediate selection,
  4849. or can be left to complete and subsequent selection made from a
  4850. restricted contents list:-
  4851.  
  4852.      A@C1
  4853.  
  4854. The search can be restricted to refine a previous search or to
  4855. add to a search. This is achieved by setting the search refinement
  4856. option O*6 as follows:-
  4857.  
  4858.    O*60       Search all frames
  4859.    O*61       Search frames matched in last search
  4860.               This refines the search (effectively an AND)
  4861.    O*62       Search frames not matched in last search
  4862.               This adds to the matched frames (OR condition)
  4863.    O*63       These work as for 1 and 2, but reset the option
  4864.    O*64             to 0 after the next search operation.
  4865.  
  4866. When an additive search is done, only the new matches are shown
  4867. in the search listing. A subsequent restricted contents list as
  4868. above will show all the matching frames.
  4869.  
  4870. If the option O*6 has 5 added to its value, the search listing
  4871. only shows the first page of lines matched, does not list the
  4872. frames for selection, and returns immediately the search is
  4873. complete or the user presses a key to abort the search. The
  4874. value of 5 is subtracted from the option value at the start of
  4875. the search, and the remaining value is used as indicated
  4876. above.
  4877.  
  4878. This feature is provided to allow combinations of searches to
  4879. be performed without user intervention, such as looking for
  4880. frames containing 'string a AND string b' or 'string a OR
  4881. string b'. Combinations of title search and text search should
  4882. start with the title search, as this will reduce the amount of
  4883. text searching required. The last search can be a normal
  4884. stopping search so that selection can be made from the
  4885. listing.
  4886. ~G
  4887. By clearing option flag O*82, the matching line will not
  4888. be displayed.
  4889.  
  4890. By setting option O*84, search conjunctions can be supported
  4891. comprising simple conjunctions on one line. The format of
  4892. the search string in this case takes the following form:-
  4893.  
  4894. stringa!stringb           stringa or stringb on a line
  4895. stringa&stringb           stringa and stringb on a line
  4896. stringa!stringb&stringc   stringa or (stringb and stringc) on a line
  4897.  
  4898. Combinations of '&' (and) and '!' (or) can be used to specify
  4899. complex search conditions.
  4900. .
  4901. .FRAME Pattern strings
  4902. .TITLE Action suffix |
  4903. The pattern string may be optionally specified after an action
  4904. modifier to format the return string into a form expected by the
  4905. action. Pattern strings consist of the string expected as a
  4906. parameter, with all occurences of the chosen string represented
  4907. by the string '%s'. Up to three occurrences of the chosen string
  4908. may be expanded in the pattern string. An example is a command
  4909. to copy a file selected from a directory display to the root
  4910. directory of drive C:-
  4911.  
  4912.    d@d*.*|COPY %s C:\%s
  4913.  
  4914. This facility can be used for more complex formatting, if the
  4915. variants on the '%s' format token are used:-
  4916.  
  4917.     %{-}{nn){.mm}s    
  4918.       |  |    |
  4919.       |  |    maximum length (truncated at right end)
  4920.       |  minimum length (right aligned, space fill)
  4921.       left align (else right align)
  4922.  
  4923.  For example:-
  4924.  
  4925.     %s    full string as supplied
  4926.     %8s    string to minimum length of 8, right aligned
  4927.     %-8s        ditto, left aligned
  4928.     %.23s    string to maximum length of 23
  4929.  
  4930. For example, to shorten a variable, x, to 5 characters, and
  4931. enclose it in square brackets (function &W is used here):-
  4932.  
  4933.    V&W$$x|x[%.5s]
  4934.  
  4935. This facility is useful where you are formatting lines for
  4936. printout, to make things line up in columns.
  4937. .
  4938. .FRAME Paged displays
  4939. .TITLE Lists presented page by page
  4940. Paged displays provide a full screen display offering one line per
  4941. option, and offering multiple pages of options if necessary.
  4942.  
  4943. F1 or ?    - Help menu
  4944. F2 or #    - Go to page number (*T)
  4945. F3 or PgUp - Previous page
  4946. F4 or Home - Start of list/file
  4947. F5         - Find next match (*T)
  4948. F6 or /    - Search file (*T)
  4949. F7         - Redisplay page (*T)
  4950. F8 or End  - End of file (*T)
  4951. F9         - Quit (*T Suspend list)
  4952. F10        - Quit (*T Quit list)
  4953. Return     - Select reference (*T Suspend if not on reference)
  4954. INS/DEL    - Add / Remove reference from notepad
  4955.  
  4956. (*T - Type file control keys)
  4957. .
  4958. .PRINT SECTION 6.
  4959. .
  4960. .PRINT TITLE
  4961. Reference Guide - Variables
  4962. .
  4963. .PRINT PAGE
  4964. .
  4965. .FRAME Variables
  4966. .TITLE Section - containers for data
  4967. HyperShell permits strings to be assigned to 'variables'.
  4968. These are token characters which hold character or numeric data
  4969. strings and can be expanded anywhere in the displayed text, and
  4970. can also be used to parameterise the control strings of the
  4971. various ~Factions~E that may be performed.
  4972.  
  4973. There are three main types of variable:-
  4974.  
  4975. ~X1[1]    ~FSystem variables~K1~E - used for HyperShell details
  4976.  
  4977. ~X1[2]    ~FApplication variables~K2~E - used by applications
  4978.  
  4979. ~X1[3]    ~FNamed variables~K3~E - extra applications storage
  4980. .
  4981. .FRAME System variables
  4982. .TITLE Variables about HyperShell itself
  4983. There are a number of system variables, some of which may be
  4984. set by hyperfile applications, and some which can only be expanded.
  4985. The HyperShell system variables have the names '0' to '9' and some
  4986. special characters, and have the following string values:-
  4987.  
  4988.  0      full pathname of HyperShell program used
  4989.  1      current frame name
  4990.  2      current frame title
  4991.  3      current file name
  4992.  4      current date
  4993.  5      current time
  4994.  6      backtrack list current depth
  4995.  7      current directory
  4996.  8      original directory
  4997.  9      HyperShell name and version
  4998.  ?      error code of last error that occurred
  4999.  <      file name returned from last paged directory display
  5000.  >      filename extension returned from last long directory
  5001.  :      list of extensions to be excluded from TYPE action
  5002.  @      Available memory
  5003.  _      File prompt (becomes null string when viewing file)
  5004.  ^      Exit status from X,x,D,d action program execution
  5005.  \      Parameter supplied in parentheses to note or script
  5006.  `      Error action - action taken on error status set
  5007.  ~~      Variable specifying string conversions for comparisons
  5008.  ,      Pseudo variable - represents ';' in action mappings
  5009.  !      Pseudo variable - represents '!' in action mappings    
  5010.  
  5011. The ':' variable is a string representing those file extensions
  5012. for which the extended directory display providing actions
  5013. (dynamic menu 'l') will not set a 'Type file' action. It is set
  5014. to the following string by default:-
  5015.  
  5016.    .EXE.COM.OBJ.SYS.DBF.LIB.
  5017.  
  5018. Additional extensions can be added by resetting the variable.
  5019. Note that extensions should have a '.' to each side.
  5020. .
  5021. .FRAME Application variables
  5022. .TITLE Variables with single character names
  5023. Application variables are strings that may be stored under a
  5024. single letter name, either upper or lower case. Thus there can
  5025. be 52 application variables. Variables can be set within a
  5026. hyperfile and may be 'expanded' within the frame text or in an
  5027. action string.
  5028.  
  5029. Application variables are provided to allow a hyperfile to modify
  5030. its behaviour depending on circumstances. For instance, variables
  5031. may be used to input parameters one at a time in order to build
  5032. up a command line for execution under DOS, or to build an action
  5033. specification. Popup menus are useful for setting variables to
  5034. one of a fixed set of values.
  5035.  
  5036. In addition, an unlimited set of ~FNamed variables~E are available,
  5037. which provide for longer term storage of data, and for sets of
  5038. data in pseudo-arrays.
  5039. .
  5040. .FRAME Expansion of variables
  5041. .TITLE Variable token specification
  5042. The variable expansion token for system and applications variables
  5043. takes the form '$$x' where x is the variable name. This is expanded
  5044. to the string value of the variable.
  5045.  
  5046. The variable may be expanded in the frame text, in a note text, or
  5047. in an action string, where it may form any part of an action string
  5048. apart from the action code itself (although the 'A' action can be
  5049. used to permit the expansion of a variable to an action code).
  5050.  
  5051. The variable expansion token is simply the flag character $$
  5052. followed by the variable name character. e.g. :-
  5053.  
  5054.    $$a
  5055.  
  5056. If the '$$' symbol is required in the text, two '$$' symbols together
  5057. will be taken to mean one, which will not be expanded when the text
  5058. is displayed, or when an action string is expanded prior to execution.
  5059. This may be used when an action string in a reference in frame text
  5060. needs to contain a variable expansion token itself, but this must
  5061. not be expanded until the action is performed.
  5062. .
  5063. .FRAME Named variables
  5064. .TITLE Variables for longterm use
  5065. There are another set of variables which can be specified. These
  5066. are set and expanded in a different manner to single character
  5067. ~Fvariables~E. They are set using the ~FLoad named variable~E action or
  5068. the ~FSet Named Variable~E action.
  5069.  
  5070. Named variables are expanded using the form:-
  5071.  
  5072.    $$(name)
  5073.  
  5074. Where 'name' is the name of the variable. The name can be specified
  5075. by a string containing single character variable expansion tokens,
  5076.  
  5077. ~X1Example:
  5078.  
  5079.    $$($$n)  or   $$(item $$n)   or   $$($$n$$m)    etc.
  5080.  
  5081. Where n is a single letter variable containing the name of the
  5082. named variable. This feature can be used for pseudo-arrays with
  5083. a limited form of 'subscripting', or indirection.
  5084. ~G
  5085. It is possible to include a single character variable expansion
  5086. token within the named variable value string. This will be expanded
  5087. when the named variable is expanded.
  5088.  
  5089. ~X1Example:
  5090.  
  5091. ZVtime=Time: $$$$5
  5092.  
  5093. This will expand to the current time in the form 'Time: hh:mm:ss'
  5094. when specified in text as $$(time).
  5095.  
  5096. ~X1Inline action modifier
  5097.  
  5098. Special forms of the named variable token can be used to
  5099. cause inline expansion of certain action modifiers. The
  5100. modifiers supported are as follows:-
  5101.  
  5102.   $$(&nnnn)      - return value of ~FString functions~E
  5103.   $$(=nnnn)      - result of ~FExpression evaluation~E
  5104.   $$(%nnnn)      - DOS ~FEnvironment Variable~E value
  5105.  
  5106. ~X1Examples
  5107.  
  5108.   $$(=a+b)    - would expand to the sum of variables a and b.
  5109.  
  5110.   $$(&L$$b)   - would expand to the length of variable b
  5111.  
  5112.   $$(%HSPATH) - would expand to the setting of HSPATH
  5113. .
  5114. .PRINT SECTION 7.
  5115. .
  5116. .PRINT TITLE
  5117. Reference Guide - Conditions
  5118. .
  5119. .PRINT PAGE
  5120. .
  5121. .FRAME Conditions
  5122. .TITLE Section - Condition codes and flags
  5123. HyperShell provides a general system of condition codes which
  5124. can be used to control various aspects of display and execution.
  5125. The condition code token is a single character, which is
  5126. specified in ~Fconditional action~Es, ~FHidden lines~Es and also
  5127. in ~Fmenus~E.
  5128.  
  5129. The condition code has a number of potential values:-
  5130.  
  5131. ~X1[1]     ~FResult of test~K1~E - for variable tests
  5132.  
  5133. ~X1[2]     ~FError status~K2~E - for action errors
  5134.  
  5135. ~X1[3]     ~FReturn value~K3~E - for action modifier returns
  5136.  
  5137. ~X1[4]     ~FLocal flags~K4~E - for frame related control
  5138.  
  5139. ~X1[5]     ~FGlobal options~K5~E - for application options
  5140. .
  5141. .FRAME Result of test
  5142. .TITLE Condition set by test
  5143. The traditional use of a condition code is to determine the result
  5144. of a test or comparison. The first set of codes are used for this
  5145. purpose, and are set up by the ~Ftest variable~E action 'v'. The test
  5146. conditions available are as follows (note the lowercase form is used)
  5147.  
  5148.    e      variable equals string            *   !
  5149.    n      variable not equal to string          !
  5150.    g      variable greater than string      *   !
  5151.    l      variable less than string         *   !
  5152.    d      variable is defined
  5153.    u      variable is undefined
  5154.    c      variable contains string
  5155.    w      variable is contained within string
  5156.    m      variable matches a pattern            ~~
  5157.    f      variable fails a pattern match        ~~
  5158.  
  5159. ~G
  5160. Note that the conditions marked with an asterisk indicate lexical
  5161. comparisons unless the comparand string starts with a numeric
  5162. digit or a minus sign '-', in which case an arithmetic (integer)
  5163. comparison is made.
  5164.  
  5165. The condition codes marked with an exclamation point are also set
  5166. by use of the ~Fexpression evaluation~E function '=', indicating
  5167. how the result compares against zero. e.g. 'g' is set if the
  5168. result is positive.
  5169.  
  5170. The condition codes marked with a ~~ are only set if a pattern
  5171. match is performed, due to the variable '~~' being set. Code
  5172. 'f' is otherwise always set.
  5173. .
  5174. .FRAME Error status
  5175. .TITLE Condition set by error
  5176. The next set of codes are used to indicate whether the error
  5177. status is set, as follows:-
  5178.  
  5179.    s      the error status is set
  5180.    o      the error status is O.K. (clear)
  5181.  
  5182. The error status can be cleared to 'O.K.' by the action 'Y', and
  5183. will otherwise retain its setting, even if successful actions are
  5184. performed.
  5185. .
  5186. .FRAME Return value
  5187. .TITLE Condition set by action modifier
  5188. This set of condition codes are used to determine whether a
  5189. string is returned from ~Faction modifier functions~E, or whether
  5190. a null string was returned or the function cancelled.
  5191.  
  5192.    r      a string was returned
  5193.    b      a blank string was returned or the function was
  5194.           cancelled
  5195.  
  5196. These are very useful for a number of purposes, for example
  5197. to determine whether a selection has been made from a menu or
  5198. a string has been input to a request, or that a timeout has
  5199. occurred from a ~Fget key with timeout~E function.
  5200. .
  5201. .FRAME Special codes
  5202. .TITLE Condition codes for variants
  5203. A special set of condition codes are provided with the variants of the
  5204. base HyperShell, to allow a hyperfile to determine which program is
  5205. running and whether an item is being edited or viewed.
  5206.  
  5207.       i        Integrated environment being used
  5208.       v        Item is being viewed, not edited
  5209.  
  5210.       x        Graphic versions eg. HG.EXE, HGI.EXE etc
  5211. .
  5212. .FRAME Local flags
  5213. .TITLE Condition codes local to frame
  5214. This set of condition codes are flags which are local to each
  5215. frame. These are usually used to flag a matching frame after a
  5216. ~Fsearch selection~E, or to control ~FHidden lines~E in frames and
  5217. notes. They are set using the ~FLocal flag toggle~E.
  5218.  
  5219.    0 to 9     frame local flag.
  5220.  
  5221.    :          visited frame flag (set after frame visited)
  5222.    /          matching frame flag (set by searches)
  5223.    <          frame more than one screen
  5224.               this is set after display of first screen of
  5225.               frame text, but is available in the footer and
  5226.               on subsequent screens and visits to the frame.
  5227. .
  5228. .FRAME Global options
  5229. .TITLE Condition code for global control
  5230. The fourth set of condition codes represent a set of general
  5231. control flags which may be used to control a hypertext application
  5232. - the ~Fapplication options~E. These flags are set using the
  5233. ~Foption setting~E action O*X and are as follows:-
  5234.  
  5235.   A to Z      application options
  5236.  
  5237. These flags are character flags which evaluate TRUE if they are set
  5238. to other than a null character.
  5239. .
  5240. .PRINT SECTION 8.
  5241. .
  5242. .PRINT TITLE
  5243. Reference Guide - Restrictions
  5244. .
  5245. .PRINT PAGE
  5246. .
  5247. .FRAME Restrictions
  5248. .TITLE Section - limits and reserved chars
  5249. This section contains:-
  5250.  
  5251. ~X1[1]    ~FSize limits~K1~E
  5252.  
  5253. ~X1[2]    ~FNumber Limits~K2~E
  5254.  
  5255. ~X1[3]    ~FReserved characters~K3~E
  5256. .
  5257. .FRAME Size limits
  5258. .TITLE Maximum lengths
  5259. Line size, including flag characters, expanded variables etc. is
  5260. limited to 255 characters.
  5261.  
  5262. Frame name may be up to 35 characters.
  5263.  
  5264. Title length may be up to 40 characters.
  5265.  
  5266. Reference text length may be up to 39 characters.
  5267.  
  5268. Action strings may be up to 40 characters, or 79 in scripts.
  5269.  
  5270. Frame text can be up to 80 characters wide.
  5271.  
  5272. Frame text can be any number of lines deep although the recommended
  5273. limit is 24 - (header lines + footer lines).
  5274.  
  5275. Note, Script and menu names must be less than 35 characters.
  5276.  
  5277. Note text can be up to 76 characters wide and 22 lines deep, extra
  5278. text being truncated.
  5279. .
  5280. .FRAME Number limits
  5281. .TITLE Maximum counts
  5282. There can be up to 100 references per displayed screen, INCLUDING
  5283. headers and footers, and any note popped up containing references.
  5284.  
  5285. A menu can now be any length, but will be displayed in groups of
  5286. 20 options. A very large menu will exhibit a delay when showing
  5287. later options.
  5288.  
  5289. A script can contain up to 200 lines.
  5290. .
  5291. .FRAME Reserved characters
  5292. .TITLE Control characters
  5293. The following characters cannot appear within the second (or
  5294. third if the second is not one of them) position of an action
  5295. specification, apart from for their stated purpose.
  5296.  
  5297.     @      Dynamic menu
  5298.     &      String function
  5299.     !      Read record
  5300.     =      Expression evaluation
  5301.     %      Environment variable
  5302.     ?      Prompted input
  5303.  
  5304. Also, for frame selection action specification
  5305.  
  5306.     +      Next frame
  5307.     -      Previous frame
  5308.  
  5309. To include the above characters in the parameter to an action,
  5310. the ~Fwhole string~E function &W can be used to 'guard' any
  5311. special characters.
  5312.  
  5313. The following characters cannot appear in the body of an action
  5314. specification, apart from for their stated purpose.
  5315.  
  5316.    $$      Variable expansion token (code $$$$ for $$)
  5317.     |      Action modifier pattern specification
  5318.     ^      (Within frame names) Hyperfile separator
  5319.    ;      Multiple action separator
  5320.           (set up variable using &C to hold ';' character)
  5321.  
  5322. The following characters cannot appear within frame text, apart from
  5323. for their stated purpose.
  5324.  
  5325.    ~~      Reference and formatting directive flag (code ~~~~ for ~~)
  5326.    $$      Variable expansion token (code $$$$ for $$)
  5327.     .      (At beginning of line) Section flag
  5328.  
  5329. The '(' character cannot be used in a note or script name.
  5330. .
  5331. .PRINT SECTION 9.
  5332. .
  5333. .PRINT TITLE
  5334. Reference Guide - Codes
  5335. .
  5336. .PRINT PAGE
  5337. .
  5338. .FRAME Codes
  5339. .TITLE Section - Codes and mappings
  5340.     This section contains information about codes and setting.
  5341.  
  5342. ~X1[1]     ~FOptions~K1~E
  5343.  
  5344. ~X1[2]     ~FExtended options~K2~E
  5345.  
  5346. ~X1[3]     ~FColour codes~K3~E
  5347.  
  5348. ~X1[4]     ~FColour schemes~K4~E
  5349.  
  5350. ~X1[5]     ~FApplication options~K5~E
  5351.  
  5352. ~X1[6]     ~FControl key mapping~K6~E
  5353.  
  5354. ~X1[7]     ~FError codes~K7~E
  5355. .
  5356. .FRAME Options
  5357. .TITLE HyperShell control
  5358. Option Def   Value   Meaning
  5359.  
  5360. 0 (0) -   1 = Use restart file for notepad
  5361.           2 = Use restart file for notepad, variables and frame name
  5362.           3 = Use restart file for notepad, variables
  5363.           4 = Use restart file for variables only
  5364.  
  5365. 1 (1) -  +1 = Symbols on menus
  5366.          +2 = First letter selection on menus (Fkeys as frame)
  5367.          +4 = Immediate (hot) menus on top line
  5368.  
  5369. 2 (1) -   1 = Record backtrack
  5370.          +2 = Extended backtrack (to page of frame)
  5371.  
  5372. 3 (1) -  +1 = Add hyperfile name as notepad extension
  5373.          +2 = Suppress INS and DEL key notepad action
  5374.          +4 = Always Note/Remove Frame, even when over ref
  5375.  
  5376. 4 (0) -  +1 = Autoreference frame names
  5377.          +2 = Application specified autoreference
  5378.          +4 = Autoreference global note names
  5379. ~G
  5380. Option Def   Value   Meaning
  5381.  
  5382. 5 (0) -   1 = 'o' output to printer
  5383.           2 =    to standard text output
  5384.           3 =    to AUX device
  5385.           4 =    to output file (opened by 'w')
  5386.          +8 = suppress output of line separators
  5387.  
  5388. 6 (0) -  +1 = Display remaining space on exit
  5389.          +2 = Swap HS.EXE (~DFNB. only HS~DT) to disk on d and D actions
  5390.               Also swap HI,HG,HDX to disk/XMS on d and D actions
  5391.  
  5392. 7 (0) -   1 = Trace script labels
  5393.           2 = Log actions and modifiers (~DFHIDE ONLY~DT)
  5394.           4 = Log condition codes (~DFHIDE ONLY~DT)
  5395.  
  5396. 8 (1) -   1 = Give warnings of unavailable items
  5397.           2 = Give warnings of unavailable files
  5398.  
  5399. 9 (0) -   1 = 'T' listing gives verbatim list
  5400.           2 =   also strips 8th bit, for Wordstar files
  5401.           3 = display with flags / variables interpreted
  5402. .
  5403. .FRAME Extended options
  5404. .TITLE HyperShell control
  5405. Option Def Value   Meaning
  5406.  
  5407.     *0 (1) -  +1 = ESC key during popups, paged displays cancels script
  5408.               +2 = Action modifier failure cancels multiple action
  5409.               +4 = Stop ESC from pausing script
  5410.  
  5411.     *1 (0) -   1 = Shadow edges on popups (uses G colour scheme)
  5412.  
  5413.     *2 (0) -   0 = No blinking
  5414.                1 = Blink mouse cursor
  5415.                2 = Blink mouse cursor and references using TAB/BackTAB
  5416.  
  5417.     *3 (0) -  +1 = Suppress mouse cursor
  5418.               +2 = Use cursor left/right to select references (as TAB)
  5419.               +4 = Position mouse on first reference in new frame
  5420.               +8 = Stop mouse moving to selected reference
  5421.  
  5422.     *4 (1) -   0 = Restrict autoreference to typed files
  5423.                1 = Include frame texts in autoref scope
  5424. ~G
  5425. Option Def Value   Meaning
  5426.  
  5427.     *5 (0) -   0 = Accept characters less than 128 only
  5428.                1 =    less than 176
  5429.                2 =    less than 255
  5430.  
  5431.     *6 (0) -   0 = Search all
  5432.                1 = Search matched frames     3 = reset after
  5433.                2 = Search unmatched frames   4 = reset after
  5434.               +5 - do 'non stop' search (+5 cleared after)
  5435.  
  5436.     *7 (8) -   n = Tabstop width
  5437.  
  5438.     *8 (1) -  +1 = Request comment on noted references
  5439.               +2 = Display matching line on text search
  5440.               +4 = Allow search conjunctions
  5441.  
  5442.     *9 (0) -   0 = case sensitive key mapping
  5443.                1 = case insensitive key mapping
  5444. .
  5445. .FRAME Application options
  5446. .TITLE Application hyperfile control
  5447. The application control options A to Z can be:-
  5448.  
  5449. Set to a character using ~FOption setting~E action O*X
  5450.  
  5451.    O*Fj    -  set option 'F' to 'j' (condition will be true)
  5452.    O*F     -  reset option 'F' (so condition is FALSE)
  5453.  
  5454. Used as a ~Fcondition code~PFGlobal options~E - A to Z
  5455.  
  5456.    aFPIt is set    -  popup message if option 'F' is set
  5457.  
  5458. Supplied using the ~FApplication option setting~E function &OX
  5459.  
  5460.    Vx&OF   -  set variable x to character value of option 'F'
  5461. .
  5462. .FRAME Control key mapping
  5463. .TITLE Control keys and headings
  5464. Certain control keys and headings are configurable using the
  5465. ~FSet key mapping~E action 'K', as follows:-
  5466.  
  5467.  Mapping Default      Used for
  5468.    KH1   SELECT FILE  (for directory popup menu)
  5469.    KH2   MHELP        (for ? key in frame display)
  5470.    KH3   HELP         (name of menu for ? in paged display)
  5471.    KH4   ZC           (ESCAPE mapping)    \
  5472.    KH5   y            (HOME mapping)       \
  5473.    KH6   ZR           (END mapping)        for frame display
  5474.    KH7   y-           (PGUP mapping)        /
  5475.    KH8   y+           (PGDN mapping)       /
  5476.    KH9   B            (BACKSPACE mapping) /
  5477.    KH0   HYPERSHELL   (Control menu heading)
  5478. .
  5479. .FRAME General mapping
  5480. .TITLE Control strings
  5481. The general mappings are a further set of control mappings.
  5482. These are configurable using the ~FSet key mapping~E action 'K',
  5483. as follows:-
  5484.  
  5485.  Mapping Default   Used for
  5486.  
  5487.    KG1   ""        ENTER / LEFT button action when not over ref
  5488.    KG2   ""        ENTER / LEFT button action in ~FDisplay text file~E
  5489.    KG3   ""        ESCape / RIGHT button action in ~FDisplay text file~E
  5490.    KG4   ""        End of title for ~FDisplay text file~E and @G
  5491.    KG5   ""        Variable split specification for ~FFormatted list~E
  5492.    KG6   "1"       Selection expression for ~FFormatted list~E
  5493.    KG7   ""        Line format template for ~FFormatted list~E
  5494.    KG8   ""        ~FString input translation~E ('from' characters)
  5495.    KG9   ""        ~FString input translation~E ('to' characters)
  5496.    KG0   ""        ~FFrame transition script~E specification
  5497. .
  5498. .FRAME Frame transition script
  5499. .TITLE To set up a frame
  5500. The frame transition script specification is set using
  5501. general mapping KG0:-
  5502.  
  5503.   KG0sFrame transition
  5504.  
  5505. This causes the named script to be called on entry to
  5506. a frame, before the frame is displayed. The specification
  5507. cane be of a local script, a global script or a file
  5508. script. The specification can contain a parameter of the
  5509. form eg:-
  5510.  
  5511.  KG0SFTS(%c,%s)
  5512.  
  5513. The %s is replaced by the 'name' used to display the frame
  5514. and the %c is replaced by the 'action'.
  5515.  
  5516. The script is called on a frame 'refresh' as well as when
  5517. moving to a new frame, so this parameter can be used to
  5518. select new frame references only.
  5519.  
  5520. For example:-
  5521.  
  5522.   KG0sFTS(%c)
  5523.  
  5524.   .SCRIPT FTS
  5525.   -- Test parameter
  5526.   J&A$$\
  5527.   L102
  5528.   -- just 'f' so quit
  5529.   L70
  5530.   -- actions for 'F' reference
  5531.   . 
  5532. .
  5533. .FRAME String input translation
  5534. .TITLE Mapping keys to special characters
  5535. The string input translation capability allows string input
  5536. characters to have a translation mapping applied against them.
  5537.  
  5538. String input is used in a number of places:-
  5539.  
  5540. 1. For input of strings on the prompt line at the bottom.
  5541.  
  5542. 2. For entry into input fields.
  5543.  
  5544. The translation converts specified character codes to other
  5545. specified character codes. This can be used for a number of
  5546. purposes, including:-
  5547.  
  5548. 1. Stopping the input of certain characters by translating them
  5549.    to a character which is rejected, such as TAB (ASCII 9).
  5550.  
  5551. 2. Mapping certain ALT shifted keys to accented characters for
  5552.    language learning applications. (Note: option setting O*51 or
  5553.    O*52 must be used to allow input of extended character set).
  5554. ~G
  5555. ~FGeneral mapping~E strings KG8 and KG9 provide the 'from' and 'to'
  5556. tables of characters. Whenever a character in the 'from' string
  5557. is input, it is translated to the corresponding character in
  5558. the 'to' string. Thus, to map the keys '%&*' to produce '!=^'
  5559. characters, the following settings are used:-
  5560.  
  5561.   KG8%&*
  5562.   KG9!=^
  5563.  
  5564. The two mapping strings must be the same length or results will
  5565. be unpredictable.
  5566.  
  5567. The mappings do not have any effect on single keystroke inputs, such
  5568. as function keys, menu selections, reference key mappings etc.
  5569. .
  5570. .FRAME Colour codes
  5571. .TITLE codes
  5572. Colour codes are as follows (monochrome in [brackets]):-
  5573.  
  5574.    K      Black [Inverse]
  5575.    B      Blue [Underline]
  5576.    G      Green
  5577.    C      Cyan
  5578.    R      Red
  5579.    M      Magenta
  5580.    Y      Yellow (brown)
  5581.    W      White (light grey) [Bright]
  5582.    k      Dark grey        (Foreground only)
  5583.    b      Light blue       (Foreground only)
  5584.    g      Light green      (Foreground only)
  5585.    c      Light Cyan       (Foreground only)
  5586.    r      Light red        (Foreground only)
  5587.    m      Light magenta    (Foreground only)
  5588.    y      Light yellow     (Foreground only)
  5589.    w      Bright white     (Foreground only)
  5590. .
  5591. .FRAME Colour schemes
  5592. .TITLE Global highlighting schemes
  5593. The available schemes are as follows, showing the scheme letter,
  5594. the default setting (foreground, background) and the normal usage.
  5595. ('User' schemes are not used by HyperShell):-
  5596.  
  5597.    Scheme colour mono      Description
  5598.  
  5599.    A      wB     BK        Action reference
  5600.    B      Wk(bl) Wk(bl)    Blink
  5601.    C      KC     KW        Menu choice
  5602.    D      KW     KW        Default title
  5603.    E      yK     wK        Frame reference - replace backtrack
  5604.    F      wK     wK        Frame reference - add to backtrack
  5605.    G      KK     KK        Ghost - used for shadows on popups
  5606.    H      KY     kW        Menu heading
  5607.    I      yY     KW        Input field
  5608.    J      KG     KW        Note heading and border
  5609.    K      yG     KW        Note
  5610.    L      RK     BK        Low intensity
  5611.    M      KW     kW        Menu reference
  5612.    N      gK     bK        Note reference
  5613.    O      yB     WK        Menu selection
  5614.    P      yr(bl) Kw(bl)    Popup message
  5615.    Q      Kk(bl) Kk(bl)    XOR for reference (with TAB/BackTAB)
  5616.    R      KW     Kw        Request / message
  5617.    S      yG     BW        Script reference
  5618.    T      WK     WK        Frame text
  5619.    U      YK     BK        (User 1)
  5620.    V      MK     bK        (User 2)
  5621.    W      GK     WK        (User 3)
  5622.    X      RK     kK        (User 4)
  5623.    Y      BK     BW        (User 5)
  5624.    Z      rK     KW        (User 6)
  5625. .
  5626. .FRAME Error codes
  5627. .TITLE Status codes for error conditions
  5628. The following error codes are set in variable '?'. The variable is
  5629. only reset on command (~Fby the 'Y' action~PFClear Status~E). An action
  5630. can be specified in ~Fsystem variable~PFsystem variables~E (`), which will
  5631. be performed when the status changes from UNSET to SET (once SET,
  5632. it should be RESET using 'Y' before the action will take place again).
  5633.  
  5634.     0      Success - (after status cleared)
  5635.     1      Operation cancelled
  5636.     2      No choice from menu
  5637.     3      End of file when reading
  5638.     4      Cannot open file
  5639.     5      File is not open
  5640.     6      File is already open
  5641.     7      File has changed
  5642.     8      At start of backtrack
  5643.     9      Divide by 0 in expression
  5644.     10     Value not expected in expression
  5645.     11     Value expected in expression
  5646.     12     Undefined opcode in expression
  5647.     13     Unmatched parenthesis in expression
  5648.     14     Syntax error in expression
  5649.     15     Script not available
  5650.     16     Menu not available
  5651.     17     Note not available
  5652.     18     Frame not available
  5653.     19     Key not defined
  5654.     20     Invalid key code
  5655.     21     Local reference - cannot be noted
  5656.     22     Not at reference when key pressed
  5657.     23     Key not mapped
  5658.     24     No action or action disabled
  5659.     25     Invalid action code
  5660.     26     No command present
  5661.     27     Environment variable not defined
  5662.     28     Invalid dynamic menu
  5663.     29     Line too wide for screen
  5664.     30     String too long
  5665.     31     Too many lines in frame
  5666.     32     Maximum script size reached
  5667.     33     Maximum menu size reached
  5668. .
  5669. .PRINT SECTION 10.
  5670. .
  5671. .PRINT TITLE
  5672. Reference Guide - Miscellaneous
  5673. .
  5674. .PRINT PAGE
  5675. .
  5676. .FRAME General
  5677. .TITLE Section - Miscellaneous information
  5678. This section contains information on:-
  5679.  
  5680. ~X1[1]    ~FConfiguration~K1~E
  5681.  
  5682. ~X1[2]    ~FAutoreference~K2~E
  5683.  
  5684. ~X1[3]    ~FAlternative Hypertext~K3~E
  5685.  
  5686. ~X1[4]    ~FExample script~K4~E
  5687. .
  5688. .FRAME Configuration
  5689. .TITLE Changing the look and feel
  5690. The option flags, extended options and key mappings permit a lot
  5691. of configuration to be done to individual hyperfiles. The colour
  5692. schemes permit the various highlighting to be fully configured.
  5693. Custom frame headers and footers can be used to create a
  5694. professional appearance to your application.
  5695.  
  5696. All the prompts, headings, format strings, error messages and
  5697. other strings can also be configured using a special file called
  5698. HYPSHELL.CFG. This provides mappings between configuration
  5699. string numbers and the strings to be used. If the file is not
  5700. supplied, default strings are used. Foreign languages can be
  5701. readily supported using this. Full details are provided in the
  5702. authoring guide.
  5703. .
  5704. .FRAME Autoreference
  5705. .TITLE Inserting references dynamically
  5706. The autoreference facility adds references dynamically as the
  5707. text is displayed. A number of kinds of autoreference are
  5708. provided.
  5709.  
  5710. 1. Frame name autoreference flags any occurrence of frame names
  5711.    in the text.
  5712.  
  5713. 2. Application autoreferencing allows specified search strings
  5714.    to be mapped to specified actions.
  5715.  
  5716. 3. Global note name autoreference flags occurrences of global
  5717.    note names in the text.
  5718.  
  5719. Both kinds of autoreference can be applied to just text
  5720. displayed using the ~Fdisplay text file~E action, or to
  5721. frame text displays as well as text files.
  5722. .
  5723. .FRAME Alternative hypertext
  5724. .TITLE Other forms of hypertext
  5725. The HyperShell single hyperfile format described in this file is
  5726. normally used for hypertext systems. HyperShell does, however,
  5727. provide a number of features which support an alternative to
  5728. this format.
  5729.  
  5730. The 'T' and 't' actions, described above, permit normal text files
  5731. to be displayed, and these files can contain simple embedded
  5732. references to other files, for display in a paged fashion using 'T'
  5733. or as a popup note using 't'. The authoring guide gives a
  5734. description of how this can be done.
  5735.  
  5736. If HyperShell is given the name of one of these simple text files,
  5737. rather than that of a normal hyperfile, it displays the file as a
  5738. single frame, possibly with multiple pages. Thus, it is not even
  5739. necessary to have a controlling hyperfile. Although it would not be
  5740. usual to do so, such a file could contain HEADER, FOOTER and global
  5741. items, provided these were supplied AFTER the main text in the
  5742. file.
  5743. .
  5744. .FRAME Example script
  5745. .TITLE to show how script works
  5746. The following script, when called with a parameter e.g.
  5747.  
  5748.     Slines(read.me)
  5749.  
  5750. counts the lines in the file whose name is supplied as a
  5751. parameter and displays the total on the bottom line.
  5752.  
  5753. The script is normally coded with a number of actions on
  5754. each line, but it is coded here with one action per line
  5755. so that comments can be added (these cannot appear on the
  5756. actual script).
  5757.  
  5758. Note that it is good practice to start a new line after a jump
  5759. or conditional jump. Labels must appear at the start of a line.
  5760.  
  5761. If there is an error opening the file, an error message will
  5762. have been displayed already, so we just quit. The error status
  5763. from the read is assumed to be an end of file indication. Note
  5764. that you must remember to close the file when you have finished
  5765. with it, otherwise it remains open until you quit HyperShell.~G
  5766. ~C6.SCRIPT lines          - select action for details
  5767. ~Fv\~PFTest variable~E                     - is there a ~Fparameter~PFparameters~E
  5768. ~FjeERROR~PFjump within script~E                - no - go to error display ----\
  5769. ~FVx0~PFSet variable~E                    - set count variable to zero   |
  5770. ~FY~PFclear status~E                      - clear error status           |
  5771. ~Fr$$\~PFOpen/close input file~E                    - open file                    |
  5772. ~Fasq~PFConditional action~E                    - quit if error                |
  5773. ~FLREAD~PFLabel in script~E                  - Label for read    <-------------\
  5774. ~FY~PFclear status~E                      - clear error status           |  |
  5775. Vy~F!~PFRead and lookup functions~E                    - read record into variable y  |  |
  5776. j~FsEOF~PFconditions~E                  - if end of file goto display --- | \
  5777. Vx~F=x+1~PFexpression evaluation~E                 - increment count variable     |  | |
  5778. ~FJREAD~PFjump within script~E                  - loop back to read  -------------/ |
  5779. ~FLERROR~PFlabel in script~E                 - error display label  <-------/    |
  5780. ~FPNo parameter supplied~PFpopup message~E     - display error message         |
  5781. ~Fq~PFquit script~E                      - quit script  ----------------\    |
  5782. ~FLEOF~PFlabel in script~E                   - End of file label    <------------/
  5783. ~Fr~PFopen/close input file~E                      - close file                   |
  5784. ~FpThere were $$x lines read~PFdisplay message~E          - display count    |
  5785. ~C6.                      - quit script at end           v
  5786. .
  5787. .END 
  5788.         End of HSREF.HYP
  5789. .
  5790.